From 825115c4a28e06d2c3a435845b032e6c01b2af6d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 14 Nov 2017 03:56:32 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_bitcoin.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/iguana/exchanges/LP_bitcoin.c b/iguana/exchanges/LP_bitcoin.c index 657672b64..97ca24817 100644 --- a/iguana/exchanges/LP_bitcoin.c +++ b/iguana/exchanges/LP_bitcoin.c @@ -3449,22 +3449,22 @@ int32_t iguana_rwmsgtx(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uint8_t is for (i=0; itx_in; i++) { len += iguana_rwvarint32(rwflag,&serialized[len],&segitems); - printf("vini.%d (%d:",i,segitems); + //printf("vini.%d (%d:",i,segitems); for (j=0; j= maxsize ) { printf("vini.%d of %d, j.%d of segitems.%d overflowed %d+%d >= max.%d\n",i,msg->tx_in,j,segitems,len,tmp,maxsize); break; } else len += tmp; } - printf("), "); + //printf("), "); } memcpy(&segtx[segtxlen-sizeof(int32_t)],&serialized[len],sizeof(int32_t)); - bits256 txid = bits256_doublesha256(0,segtx,segtxlen); - char str[65]; printf("witness sum %d vs max.%d txid %s\n",len,maxsize,bits256_str(str,txid)); + *txidp = bits256_doublesha256(0,segtx,segtxlen); + //char str[65]; printf("witness sum %d vs max.%d txid %s\n",len,maxsize,bits256_str(str,txid)); } } len += iguana_rwnum(rwflag,&serialized[len],sizeof(msg->lock_time),&msg->lock_time); @@ -3519,7 +3519,8 @@ int32_t iguana_rwmsgtx(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uint8_t is jadd(json,"vout",voutarray); jaddnum(json,"numvouts",msg->tx_out); } - *txidp = bits256_doublesha256(txidstr,txstart,len); + if ( segwitflag == 0 ) + *txidp = bits256_doublesha256(txidstr,txstart,len); if ( json != 0 ) { jaddnum(json,"locktime",msg->lock_time);