From e4a8d561edf3cfb326e86c87155fed41a61e7333 Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Tue, 14 Dec 2021 21:36:00 +0000 Subject: doc: add explanations for assert in index and magic numbers in test These were suggested in review of #23365 Co-authored-by: John Newbery --- src/index/base.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3