Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115346
D8857.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1004 B
Subscribers
None
D8857.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 10:54 (11 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187418
Default Alt Text
D8857.diff (1004 B)
Attached To
D8857: Fix UB with bench on genesis block
Event Timeline
Log In to Comment