From d6f0fafd6b047ebe12215825002c3b89dbf68670 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 19 Nov 2017 17:44:36 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_bitcoin.c | 14 +++++++------- iguana/exchanges/LP_transaction.c | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/iguana/exchanges/LP_bitcoin.c b/iguana/exchanges/LP_bitcoin.c index d687b409f..26dfd22f6 100644 --- a/iguana/exchanges/LP_bitcoin.c +++ b/iguana/exchanges/LP_bitcoin.c @@ -3295,9 +3295,9 @@ bits256 bitcoin_sigtxid(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uint8_t i { dest.vins[i].vinscript = spendscript; dest.vins[i].scriptlen = spendlen; - //int32_t j; for (j=0; j 0 ) // (dest.tx_in != 1 || bits256_nonz(dest.vins[0].prev_hash) != 0) && dest.vins[0].scriptlen > 0 && { #ifdef BTC2_VERSION @@ -3323,7 +3323,7 @@ bits256 bitcoin_sigtxid(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uint8_t i revsigtxid = bits256_doublesha256(0,serialized,len); for (i=0; ilongestchain; symbol = coin->symbol; @@ -718,7 +718,8 @@ char *iguana_validaterawtx(void *ctx,struct iguana_info *coin,struct iguana_msgt printf("%02x",msgtx->vins[i].vinscript[j]); printf(" vin.%d (%s) scriptlen.%d spendlen.%d finalize.%d\n",i,jprint(item,0),msgtx->vins[i].scriptlen,V[i].spendlen,finalized); } - finalized = iguana_vininfo_create(taddr,pubtype,p2shtype,isPoS,serialized2,maxsize,msgtx,vins,numinputs,V); + if ( (txobj= bitcoin_hex2json(taddr,pubtype,p2shtype,isPoS,height,&msgtx->txid,msgtx,rawtx,extraspace,extralen,0,0,suppress_pubkeys,zcash)) != 0 ) + printf("updated.(%s)\n",jprint(txobj,0)); complete = bitcoin_verifyvins(ctx,symbol,taddr,pubtype,p2shtype,isPoS,height,&signedtxid,&signedtx,msgtx,serialized2,maxsize,V,SIGHASH_ALL,1,V->suppress_pubkeys,LP_IS_BITCOINCASH); msgtx->txid = signedtxid; log = cJSON_CreateArray();