This commit is contained in:
jl777
2016-11-07 08:10:17 -03:00
parent a10aafcc06
commit ee0744d2b5
2 changed files with 5 additions and 6 deletions

View File

@@ -349,7 +349,7 @@ void komodo_gateway_voutupdate(char *symbol,int32_t isspecial,int32_t height,int
int32_t komodo_gateway_tx(char *symbol,int32_t height,int32_t txi,char *txidstr,uint32_t port)
{
char *retstr,params[256],*hexstr; uint8_t script[10000]; cJSON *json,*result,*vouts,*item,*sobj; int32_t vout,n,len,isspecial,retval = -1; uint64_t value,vpub_old,vpub_new; bits256 txid;
char *retstr,params[256],*hexstr; uint8_t script[10000]; cJSON *oldpub,*newpub,*json,*result,*vouts,*item,*sobj; int32_t vout,n,len,isspecial,retval = -1; uint64_t value; bits256 txid;
sprintf(params,"[\"%s\", 1]",txidstr);
if ( (retstr= komodo_issuemethod((char *)"getrawtransaction",params,port)) != 0 )
{
@@ -357,11 +357,10 @@ int32_t komodo_gateway_tx(char *symbol,int32_t height,int32_t txi,char *txidstr,
{
if ( (result= jobj(json,(char *)"result")) != 0 )
{
printf("RESULT.(%s)\n",jprint(result,0));
vpub_old = jdouble(result,(char *)"vpub_old") * COIN;
vpub_new = jdouble(result,(char *)"vpub_new") * COIN;
oldpub = jobj(result,(char *)"vpub_old");
newpub = jobj(result,(char *)"vpub_new");
retval = 0;
if ( vpub_old == 0 && vpub_new == 0 && (vouts= jarray(&n,result,(char *)"vout")) != 0 )
if ( oldpub == 0 && newpub == 0 && (vouts= jarray(&n,result,(char *)"vout")) != 0 )
{
isspecial = 0;
txid = jbits256(result,(char *)"txid");