Page MenuHomePhabricator

D8857.diff
No OneTemporary

D8857.diff

diff --git a/src/validation.cpp b/src/validation.cpp
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1636,6 +1636,8 @@
pindex->pprev == nullptr ? BlockHash() : pindex->pprev->GetBlockHash();
assert(hashPrevBlock == view.GetBestBlock());
+ nBlocksTotal++;
+
// Special case for the genesis block, skipping connection of its
// transactions (its coinbase is unspendable)
if (block.GetHash() == consensusParams.hashGenesisBlock) {
@@ -1646,8 +1648,6 @@
return true;
}
- nBlocksTotal++;
-
bool fScriptChecks = true;
if (!hashAssumeValid.IsNull()) {
// We've been configured with the hash of a block which has been
@@ -2563,6 +2563,7 @@
nTime3 = GetTimeMicros();
nTimeConnectTotal += nTime3 - nTime2;
+ assert(nBlocksTotal > 0);
LogPrint(BCLog::BENCH,
" - Connect total: %.2fms [%.2fs (%.2fms/blk)]\n",
(nTime3 - nTime2) * MILLI, nTimeConnectTotal * MICRO,

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 10:54 (15 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187418
Default Alt Text
D8857.diff (1004 B)

Event Timeline