From 8eb0e2d8106373962374df22473bd1c75f41ca80 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 14 Nov 2014 15:00:15 -0800 Subject: [PATCH] do not include parent block. --- src/bitcoindjs.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 91e23d8c..3ac4beff 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -384,7 +384,7 @@ static inline void cblock_to_jsblock(const CBlock& cblock, CBlockIndex* cblock_index, Local jsblock, bool is_new); static inline void -ctx_to_jstx(const CTransaction& ctx, uint256 block_hash, Local jstx, bool parent=false); +ctx_to_jstx(const CTransaction& ctx, uint256 block_hash, Local jstx /*, bool parent=false*/ ); static inline void jsblock_to_cblock(const Local jsblock, CBlock& cblock); @@ -5602,7 +5602,7 @@ cblock_to_jsblock(const CBlock& cblock, CBlockIndex* cblock_index, Local BOOST_FOREACH(const CTransaction& ctx, cblock.vtx) { Local jstx = NanNew(); const uint256 block_hash = cblock.GetHash(); - ctx_to_jstx(ctx, block_hash, jstx, true); + ctx_to_jstx(ctx, block_hash, jstx /*, true*/ ); txs->Set(ti, jstx); ti++; } @@ -5621,7 +5621,7 @@ cblock_to_jsblock(const CBlock& cblock, CBlockIndex* cblock_index, Local } static inline void -ctx_to_jstx(const CTransaction& ctx, uint256 block_hash, Local jstx, bool parent=false) { +ctx_to_jstx(const CTransaction& ctx, uint256 block_hash, Local jstx /*, bool parent=false*/ ) { // With v0.9.0 // jstx->Set(NanNew("mintxfee"), NanNew((int64_t)ctx.nMinTxFee)->ToInteger()); // jstx->Set(NanNew("minrelaytxfee"), NanNew((int64_t)ctx.nMinRelayTxFee)->ToInteger()); @@ -5737,16 +5737,16 @@ ctx_to_jstx(const CTransaction& ctx, uint256 block_hash, Local jstx, boo jstx->Set(NanNew("walletconflicts"), conflicts); jstx->Set(NanNew("time"), NanNew(cwtx.GetTxTime())); jstx->Set(NanNew("timereceived"), NanNew((int64_t)cwtx.nTimeReceived)); - if (!parent) { - CBlock cblock; - //CBlockIndex *cblock_index = mapBlockIndex[cwtx.hashBlock]; - CBlockIndex *cblock_index = mapBlockIndex[block_hash]; - if (ReadBlockFromDisk(cblock, cblock_index)) { - Local jsblock = NanNew(); - cblock_to_jsblock(cblock, cblock_index, jsblock, false); - jstx->Set(NanNew("_block"), jsblock); - } - } + // if (!parent) { + // CBlock cblock; + // //CBlockIndex *cblock_index = mapBlockIndex[cwtx.hashBlock]; + // CBlockIndex *cblock_index = mapBlockIndex[block_hash]; + // if (ReadBlockFromDisk(cblock, cblock_index)) { + // Local jsblock = NanNew(); + // cblock_to_jsblock(cblock, cblock_index, jsblock, false); + // jstx->Set(NanNew("_block"), jsblock); + // } + // } } else { jstx->Set(NanNew("blockhash"), NanNew(uint256(0).GetHex())); jstx->Set(NanNew("confirmations"), NanNew(-1));