aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-16 08:54:59 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-16 08:55:06 +0100
commitdf6e961c417bc6e733f2fcefd2d712178a3da4b6 (patch)
treefb8f9fe31554403a1f59c3170791887a06ba4c95 /src
parentce463cf450539867f3d48fe70f64b78051c32add (diff)
parente4a8d561edf3cfb326e86c87155fed41a61e7333 (diff)
downloadbitcoin-df6e961c417bc6e733f2fcefd2d712178a3da4b6.tar.xz
Merge bitcoin/bitcoin#23777: doc: follow-ups from #23365 (index backwards search)
e4a8d561edf3cfb326e86c87155fed41a61e7333 doc: add explanations for assert in index and magic numbers in test (Martin Zumsande) Pull request description: This adds two explanations suggested in the review of #23365, that I didn't manage to address before that PR was merged: https://github.com/bitcoin/bitcoin/pull/23365#discussion_r763981042 https://github.com/bitcoin/bitcoin/pull/23365#discussion_r763982639 ACKs for top commit: jnewbery: ACK e4a8d561edf3cfb326e86c87155fed41a61e7333 Tree-SHA512: 0500c8abb37bb3e3694463ad5e74b2e1483615ccf1d7529b0d5faa694652ada17d242dc7fda6d995733766c627d54178a2c8fa21a570cdf13292f64ff5425b56
Diffstat (limited to 'src')
-rw-r--r--src/index/base.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/index/base.cpp b/src/index/base.cpp
index 8525dcbfa0..24c289ed51 100644
--- a/src/index/base.cpp
+++ b/src/index/base.cpp
@@ -96,6 +96,8 @@ bool BaseIndex::Init()
prune_violation = false;
break;
}
+ // block->pprev must exist at this point, since block_to_test is part of the chain
+ // and thus must be encountered when going backwards from the tip
assert(block->pprev);
block = block->pprev;
}