From 94a28caa02456c92bc44d929b8fe22d13ec870d2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 23 Jun 2017 11:19:24 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_bitcoin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_bitcoin.c b/iguana/exchanges/LP_bitcoin.c index 9f3fae745..168b728ec 100644 --- a/iguana/exchanges/LP_bitcoin.c +++ b/iguana/exchanges/LP_bitcoin.c @@ -2039,7 +2039,7 @@ int32_t bitcoin_addr2rmd160(uint8_t taddr,uint8_t *addrtypep,uint8_t rmd160[20], { // validate with trailing hash, then remove hash hash = bits256_doublesha256(0,buf,20+offset); - *addrtypep = *buf; + *addrtypep = (taddr == 0) ? *buf : buf[1]; memcpy(rmd160,buf+offset,20); if ( (buf[20+offset]&0xff) == hash.bytes[31] && (buf[21+offset]&0xff) == hash.bytes[30] &&(buf[22+offset]&0xff) == hash.bytes[29] && (buf[23+offset]&0xff) == hash.bytes[28] ) {