From 049ab5c55b69cca812c02c12dacd6086ec7ce978 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 4 Jun 2018 08:26:39 -1100 Subject: [PATCH] Suppress error for segwit address --- iguana/exchanges/LP_bitcoin.c | 2 +- iguana/exchanges/LP_rpc.c | 4 +++- iguana/mini-gmp.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_bitcoin.c b/iguana/exchanges/LP_bitcoin.c index 2201d67d7..0d33dc724 100644 --- a/iguana/exchanges/LP_bitcoin.c +++ b/iguana/exchanges/LP_bitcoin.c @@ -2093,7 +2093,7 @@ int32_t bitcoin_addr2rmd160(char *symbol,uint8_t taddr,uint8_t *addrtypep,uint8_ } else if ( (strcmp(symbol,"GRS") == 0 || strcmp(symbol,"SMART") == 0) && (buf[20+offset]&0xff) == hash.bytes[0] && (buf[21+offset]&0xff) == hash.bytes[1] && (buf[22+offset]&0xff) == hash.bytes[2] && (buf[23+offset]&0xff) == hash.bytes[3] ) return(20); - else + else if ( strcmp(symbol,"BTC") != 0 || addrtype == 0 || addrtype == 5 ) { int32_t i; //if ( len > 20 ) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 3d9139bb0..0e59fc626 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -750,7 +750,9 @@ again: } if ( strcmp(coin->estimatefeestr,"estimatesmartfee") == 0 && (rate= jdouble(errjson,"feerate")) != 0 ) { - printf("extracted feerate %.8f from estimatesmartfee\n",rate); + static uint32_t counter; + if ( counter++ < 10 ) + printf("extracted feerate %.8f from estimatesmartfee\n",rate); rate /= 1024.; } free_json(errjson); diff --git a/iguana/mini-gmp.c b/iguana/mini-gmp.c index 99cb68222..a40341c1b 100644 --- a/iguana/mini-gmp.c +++ b/iguana/mini-gmp.c @@ -4403,7 +4403,7 @@ int32_t bitcoin_base58decode(uint8_t *data,char *coinaddr) if ( *p != '\0' ) { int32_t zeroval(); - printf("bitcoin_base58decode error: p %02x != 0x00\n",*p); + //printf("bitcoin_base58decode error: p %02x != 0x00\n",*p); mpz_clear(bn), mpz_clear(bn58); return(-1); }