From d3e455ecad7e1ea561c0059bf870810a2d3a455d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 19 Sep 2017 22:10:14 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_rpc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 2e2a1fd0b..39ddac1a0 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -276,7 +276,9 @@ cJSON *LP_gettx(char *symbol,bits256 txid) hexstr = jprint(retjson,1); if ( strlen(hexstr) > 10000 ) { - printf("rawtransaction too big %d\n",(int32_t)strlen(hexstr)); + static uint32_t counter; + if ( counter++ < 3 ) + printf("rawtransaction too big %d\n",(int32_t)strlen(hexstr)); free(hexstr); return(cJSON_Parse("{\"error\":\"transaction too big\"}")); } @@ -326,9 +328,11 @@ cJSON *LP_gettxout(char *symbol,bits256 txid,int32_t vout) if ( (hexobj= bitcoin_json(coin,"blockchain.transaction.get",buf)) != 0 ) { hexstr = jprint(hexobj,1); - if ( strlen(hexstr) > 50000 ) + if ( strlen(hexstr) > 10000 ) { - printf("rawtransaction too big %d\n",(int32_t)strlen(hexstr)); + static uint32_t counter; + if ( counter++ < 3 ) + printf("rawtransaction too big %d\n",(int32_t)strlen(hexstr)); free(hexstr); return(cJSON_Parse("{\"error\":\"transaction too big\"}")); }