Browse Source

Test

etomic
jl777 7 years ago
parent
commit
1b8bc2269e
  1. 12
      iguana/exchanges/LP_socket.c

12
iguana/exchanges/LP_socket.c

@ -594,6 +594,8 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
if ( usecache == 0 || electrumflag > 1 ) if ( usecache == 0 || electrumflag > 1 )
{ {
if ( (retjson= electrum_strarg(symbol,ep,retjsonp,"blockchain.address.listunspent",addr,ELECTRUM_TIMEOUT)) != 0 ) if ( (retjson= electrum_strarg(symbol,ep,retjsonp,"blockchain.address.listunspent",addr,ELECTRUM_TIMEOUT)) != 0 )
{
if ( jobj(retjson,"error") == 0 && is_cJSON_Array(retjson) != 0 )
{ {
//printf("%s.%d u.%u/%d t.%ld %s LISTUNSPENT.(%d)\n",coin->symbol,height,ap->unspenttime,ap->unspentheight,time(NULL),addr,(int32_t)strlen(jprint(retjson,0))); //printf("%s.%d u.%u/%d t.%ld %s LISTUNSPENT.(%d)\n",coin->symbol,height,ap->unspenttime,ap->unspentheight,time(NULL),addr,(int32_t)strlen(jprint(retjson,0)));
updatedflag = 0; updatedflag = 0;
@ -611,7 +613,15 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
ap->unspentheight = height; ap->unspentheight = height;
} }
} }
} else retjson = LP_address_utxos(coin,addr,1); else
{
free_json(retjson);
retjson = 0;
}
}
}
if ( retjson == 0 )
retjson = LP_address_utxos(coin,addr,1);
return(retjson); return(retjson);
} }

Loading…
Cancel
Save