doc: add explanations for assert in index and magic numbers in test

These were suggested in review of #23365

Co-authored-by: John Newbery <john@johnnewbery.com>
This commit is contained in:
Martin Zumsande
2021-12-14 21:36:00 +00:00
parent aaaceb7fb1
commit e4a8d561ed
2 changed files with 4 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ class FeatureBlockfilterindexPruneTest(BitcoinTestFramework):
self.log.info("prune some blocks")
pruneheight = self.nodes[0].pruneblockchain(400)
# the prune heights used here and below are magic numbers that are determined by the
# thresholds at which block files wrap, so they depend on disk serialization and default block file size.
assert_equal(pruneheight, 248)
self.log.info("check if we can access the tips blockfilter when we have pruned some blocks")