Browse Source

Suppress error for segwit address

pass-iguana-arg
jl777 7 years ago
parent
commit
049ab5c55b
  1. 2
      iguana/exchanges/LP_bitcoin.c
  2. 4
      iguana/exchanges/LP_rpc.c
  3. 2
      iguana/mini-gmp.c

2
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] ) 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); return(20);
else else if ( strcmp(symbol,"BTC") != 0 || addrtype == 0 || addrtype == 5 )
{ {
int32_t i; int32_t i;
//if ( len > 20 ) //if ( len > 20 )

4
iguana/exchanges/LP_rpc.c

@ -750,7 +750,9 @@ again:
} }
if ( strcmp(coin->estimatefeestr,"estimatesmartfee") == 0 && (rate= jdouble(errjson,"feerate")) != 0 ) 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.; rate /= 1024.;
} }
free_json(errjson); free_json(errjson);

2
iguana/mini-gmp.c

@ -4403,7 +4403,7 @@ int32_t bitcoin_base58decode(uint8_t *data,char *coinaddr)
if ( *p != '\0' ) if ( *p != '\0' )
{ {
int32_t zeroval(); 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); mpz_clear(bn), mpz_clear(bn58);
return(-1); return(-1);
} }

Loading…
Cancel
Save