jl777 7 years ago
parent
commit
24e35d5385
  1. 15
      iguana/exchanges/LP_socket.c
  2. 1
      iguana/exchanges/LP_utxo.c

15
iguana/exchanges/LP_socket.c

@ -371,7 +371,7 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch
usleep(10000);
if ( *retjsonp == 0 )
{
printf("unexpected %s timeout with null retjson: %s %s\n",ep->symbol,method,params);
//printf("unexpected %s timeout with null retjson: %s %s\n",ep->symbol,method,params);
*retjsonp = cJSON_Parse("{\"error\":\"timeout\"}");
}
return(*retjsonp);
@ -666,11 +666,14 @@ 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 (%s)\n",ep->symbol,stritem->str);
errjson = cJSON_CreateObject();
jaddnum(errjson,"id",item->type);
jaddstr(errjson,"error","timeout");
*((cJSON **)stritem->retptrp) = errjson;
if ( 0 )
{
printf("expired %s (%s)\n",ep->symbol,stritem->str);
errjson = cJSON_CreateObject();
jaddnum(errjson,"id",item->type);
jaddstr(errjson,"error","timeout");
*((cJSON **)stritem->retptrp) = errjson;
}
free(item);
}
}

1
iguana/exchanges/LP_utxo.c

@ -29,6 +29,7 @@
// handle spurious errors
// handle invalid data
//REJECT KMD ccee27b53b52ca61bbc9fdc7de5feb0a12c14d4d92639414d372f002cc3d092f/v0 value.468169379 vs 468169380 ({"bestblock":"080400d4216c02d100004fd2f4f3505ddb507b643785e02703d3412feba39fb1","confirmations":2356,"value":4.68169380,"scriptPubKey":{"asm":"0224e31f93eff0cc30eaf0b2389fbc591085c0e122c4d11862c1729d090106c842 OP_CHECKSIG","hex":"210224e31f93eff0cc30eaf0b2389fbc591085c0e122c4d11862c1729d090106c842ac","reqSigs":1,"type":"pubkey","addresses":["RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o"]},"version":1,"coinbase":true})
uint64_t LP_value_extract(cJSON *obj,int32_t addinterest)
{

Loading…
Cancel
Save