diff --git a/crypto777/bitcoind_RPC.c b/crypto777/bitcoind_RPC.c index d3e69d614..248fd3c8a 100755 --- a/crypto777/bitcoind_RPC.c +++ b/crypto777/bitcoind_RPC.c @@ -163,7 +163,7 @@ try_again: databuf = (char *)malloc(256 + strlen(command) + strlen(params)); sprintf(databuf,"{\"id\":\"jl777\",\"method\":\"%s\",\"params\":%s%s%s}",command,bracket0,params,bracket1); - //printf("url.(%s) userpass.(%s) databuf.(%s)\n",url,userpass,databuf); + printf("url.(%s) userpass.(%s) databuf.(%s)\n",url,userpass,databuf); // } //else if ( specialcase != 0 ) fprintf(stderr,"databuf.(%s)\n",params); curl_easy_setopt(curl_handle,CURLOPT_POST,1L); @@ -189,7 +189,7 @@ try_again: free(s.ptr); return(0); } - else if ( numretries >= 1 ) + else if ( numretries >= 2 ) { printf("Maximum number of retries exceeded!\n"); free(s.ptr); diff --git a/iguana/exchanges/bitcoin.c b/iguana/exchanges/bitcoin.c index d6f6bc5ee..fd040c820 100755 --- a/iguana/exchanges/bitcoin.c +++ b/iguana/exchanges/bitcoin.c @@ -1474,9 +1474,10 @@ struct bitcoin_unspent *iguana_unspentsget(struct supernet_info *myinfo,struct i sprintf(params,"%.0f, 99999999",minconfirms); if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"listunspent",params)) != 0 ) { + printf("unspents.(%s)\n",retstr); if ( (utxo= cJSON_Parse(retstr)) != 0 ) { - if ( (*numunspentsp= cJSON_GetArraySize(utxo)) > 0 ) + if ( (*numunspentsp= cJSON_GetArraySize(jobj(utxo,"result"))) > 0 ) { unspents = calloc(*numunspentsp,sizeof(*unspents)); for (i=n=0; i<*numunspentsp; i++)