From 24e35d53858710039ef802343742bc41595810d1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 19 Sep 2017 23:03:36 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_socket.c | 15 +++++++++------ iguana/exchanges/LP_utxo.c | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 9274ecbbb..493aa1ead 100644 --- a/iguana/exchanges/LP_socket.c +++ b/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); } } diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 300dfb47b..2522ea529 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/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) {