test: pruning: Check that verifychain can be called when pruned

This commit is contained in:
MarcoFalke 2018-12-11 19:09:54 -05:00
parent 7701b62561
commit fa3e874d69
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -191,6 +191,8 @@ class PruneTest(BitcoinTestFramework):
def reorg_back(self):
# Verify that a block on the old main chain fork has been pruned away
assert_raises_rpc_error(-1, "Block not available (pruned data)", self.nodes[2].getblock, self.forkhash)
with self.nodes[2].assert_debug_log(expected_msgs=['block verification stopping at height', '(pruning, no data)']):
self.nodes[2].verifychain(checklevel=4, nblocks=0)
self.log.info("Will need to redownload block %d" % self.forkheight)
# Verify that we have enough history to reorg back to the fork point