jl777 7 years ago
parent
commit
f0b652864d
  1. 7
      iguana/exchanges/LP_rpc.c
  2. 2
      iguana/exchanges/LP_socket.c
  3. 3
      iguana/exchanges/LP_utxo.c

7
iguana/exchanges/LP_rpc.c

@ -159,6 +159,13 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params)
{
if ( (retjson= electrum_submit(coin->symbol,coin->electrum,&retjson,method,params,LP_HTTP_TIMEOUT)) != 0 )
{
if ( jobj(retjson,"error") != 0 )
{
free_json(retjson);
retjson = 0;
retjson = electrum_submit(coin->symbol,coin->electrum,&retjson,method,params,LP_HTTP_TIMEOUT);
printf("RETRY.(%s)\n",jprint(retjson,0));
}
//printf("electrum %s.%s -> (%s)\n",method,params,jprint(retjson,0));
/*if ( (resultjson= jobj(retjson,"result")) != 0 )
{

2
iguana/exchanges/LP_socket.c

@ -666,7 +666,7 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
if ( stritem->expiration < ep->lasttime )
{
DL_DELETE(ep->pendingQ.list,item);
printf("expired (%s)\n",stritem->str);
printf("expired %s (%s)\n",ep->symbol,stritem->str);
errjson = cJSON_CreateObject();
jaddnum(errjson,"id",item->type);
jaddstr(errjson,"error","timeout");

3
iguana/exchanges/LP_utxo.c

@ -26,6 +26,9 @@
// pruned node, network for external listunspent, gettxout to validate
// electrum only, network for gettxout
// handle spurious errors
// handle invalid data
uint64_t LP_value_extract(cJSON *obj,int32_t addinterest)
{

Loading…
Cancel
Save