Browse Source

Merge pull request #881 from jl777/jl777

squelch spurious errors from segwit addresses
pass-iguana-arg
jl777 7 years ago
committed by GitHub
parent
commit
da04b06099
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      iguana/exchanges/LP_bitcoin.c
  2. 4
      iguana/exchanges/LP_rpc.c
  3. 7
      iguana/exchanges/LP_signatures.c
  4. 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] )
return(20);
else
else if ( strcmp(symbol,"BTC") != 0 || *addrtypep == 0 || *addrtypep == 5 )
{
int32_t i;
//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 )
{
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);

7
iguana/exchanges/LP_signatures.c

@ -721,9 +721,12 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_
if ( IPC_ENDPOINT >= 0 )
LP_queuecommand(0,msg,IPC_ENDPOINT,-1,0);
memset(&zero,0,sizeof(zero));
if ( bits256_nonz(qp->srchash) != 0 )
LP_reserved_msg(1,qp->srccoin,qp->destcoin,qp->srchash,clonestr(msg));
LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg));
//if ( bits256_nonz(qp->srchash) != 0 )
{
sleep(1);
LP_reserved_msg(1,qp->srccoin,qp->destcoin,qp->srchash,clonestr(msg));
}
free(msg);
}

2
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);
}

Loading…
Cancel
Save