From a0344f90527dc22ed8be79c3e99242fb43945fd1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Oct 2016 17:35:04 -0300 Subject: [PATCH] test --- src/komodo.h | 2 +- src/main.cpp | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 56af84eb5..9fbf1225c 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -208,7 +208,7 @@ int32_t komodo_blockindexcheck(CBlockIndex *pindex,uint32_t *nBitsp) return(0); } -void komodo_connectblock(CBlockIndex *pindex,CBlock& block,CCoinsViewCache& view) +void komodo_connectblock(CBlockIndex *pindex,CBlock& block) { char *scriptstr,*opreturnstr; uint32_t notarizedheight; uint8_t opret[256]; int32_t i,j,k,opretlen,len,numvins,numvouts,height,txn_count; uint256 kmdtxid,btctxid; diff --git a/src/main.cpp b/src/main.cpp index 50fb70345..2eb7a6275 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2221,8 +2221,27 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin int64_t nTime4 = GetTimeMicros(); nTimeCallbacks += nTime4 - nTime3; LogPrint("bench", " - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeCallbacks * 0.000001); + + int32_t i,j,height,txn_count,numvins; char *scriptstr; //FlushStateToDisk(); - komodo_connectblock(pindex,*(CBlock *)&block,view); + height = pindex->nHeight; + txn_count = block.vtx.size(); + for (i=0; ivout[prevout.n].scriptPubKey.ToString().c_str(); + printf("ht.%d txi.%d vini.%d of %d: (%s)\n",height,i,j,numvins,scriptstr); + } + } + } + komodo_connectblock(pindex,*(CBlock *)&block); return true; }