mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
merge bitcoin#23777: follow-ups from bitcoin#23365
This commit is contained in:
parent
a681750798
commit
577da313df
@ -99,6 +99,8 @@ bool BaseIndex::Init()
|
|||||||
prune_violation = false;
|
prune_violation = false;
|
||||||
break;
|
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);
|
assert(block->pprev);
|
||||||
block = block->pprev;
|
block = block->pprev;
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,8 @@ class FeatureBlockfilterindexPruneTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
self.log.info("prune some blocks")
|
self.log.info("prune some blocks")
|
||||||
pruneheight = self.nodes[0].pruneblockchain(400)
|
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, 366)
|
assert_equal(pruneheight, 366)
|
||||||
|
|
||||||
self.log.info("check if we can access the tips blockfilter when we have pruned some blocks")
|
self.log.info("check if we can access the tips blockfilter when we have pruned some blocks")
|
||||||
|
Loading…
Reference in New Issue
Block a user