mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-07-27 16:49:04 +02:00
test/doc: remove misleading comment and improve tests
remove misleading comment for m_blocks_unlinked since for pruned nodes: - usually A is the missing data (just like in non-pruned nodes) - in PruneOneBlockFile, we remove entries once data for B is missing. Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
This commit is contained in:
@@ -352,7 +352,6 @@ public:
|
||||
|
||||
/**
|
||||
* All pairs A->B, where A (or one of its ancestors) misses transactions, but B has transactions.
|
||||
* Pruned nodes may have entries where B is missing data.
|
||||
*/
|
||||
std::multimap<CBlockIndex*, CBlockIndex*> m_blocks_unlinked;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
WARNING:
|
||||
This test uses 4GB of disk space.
|
||||
This test takes 30 mins or more (up to 2 hours)
|
||||
"""
|
||||
import os
|
||||
|
||||
@@ -351,17 +350,15 @@ class PruneTest(BitcoinTestFramework):
|
||||
self.log.info("Stop and start pruning node to trigger wallet rescan")
|
||||
self.restart_node(2, extra_args=["-prune=550"])
|
||||
|
||||
wallet_info = self.nodes[2].getwalletinfo()
|
||||
self.wait_until(lambda: wallet_info["scanning"] == False)
|
||||
self.wait_until(lambda: wallet_info["lastprocessedblock"]["height"] == self.nodes[2].getblockcount())
|
||||
self.wait_until(lambda: self.nodes[2].getwalletinfo()["scanning"] == False)
|
||||
self.wait_until(lambda: self.nodes[2].getwalletinfo()["lastprocessedblock"]["height"] == self.nodes[2].getblockcount())
|
||||
|
||||
# check that wallet loads successfully when restarting a pruned node after IBD.
|
||||
# this was reported to fail in #7494.
|
||||
self.restart_node(5, extra_args=["-prune=550", "-blockfilterindex=1"]) # restart to trigger rescan
|
||||
|
||||
wallet_info = self.nodes[5].getwalletinfo()
|
||||
self.wait_until(lambda: wallet_info["scanning"] == False)
|
||||
self.wait_until(lambda: wallet_info["lastprocessedblock"]["height"] == self.nodes[0].getblockcount())
|
||||
self.wait_until(lambda: self.nodes[5].getwalletinfo()["scanning"] == False)
|
||||
self.wait_until(lambda: self.nodes[5].getwalletinfo()["lastprocessedblock"]["height"] == self.nodes[0].getblockcount())
|
||||
|
||||
def run_test(self):
|
||||
self.log.info("Warning! This test requires 4GB of disk space")
|
||||
|
||||
Reference in New Issue
Block a user