Skip to content

Commit 0852925

Browse files
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 <[email protected]>
1 parent ca4a380 commit 0852925

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎src/node/blockstorage.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ class BlockManager
352352

353353
/**
354354
* All pairs A->B, where A (or one of its ancestors) misses transactions, but B has transactions.
355-
* Pruned nodes may have entries where B is missing data.
356355
*/
357356
std::multimap<CBlockIndex*, CBlockIndex*> m_blocks_unlinked;
358357

‎test/functional/feature_pruning.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
WARNING:
88
This test uses 4GB of disk space.
9-
This test takes 30 mins or more (up to 2 hours)
109
"""
1110
import os
1211

@@ -351,17 +350,15 @@ def test_wallet_rescan(self):
351350
self.log.info("Stop and start pruning node to trigger wallet rescan")
352351
self.restart_node(2, extra_args=["-prune=550"])
353352

354-
wallet_info = self.nodes[2].getwalletinfo()
355-
self.wait_until(lambda: wallet_info["scanning"] == False)
356-
self.wait_until(lambda: wallet_info["lastprocessedblock"]["height"] == self.nodes[2].getblockcount())
353+
self.wait_until(lambda: self.nodes[2].getwalletinfo()["scanning"] == False)
354+
self.wait_until(lambda: self.nodes[2].getwalletinfo()["lastprocessedblock"]["height"] == self.nodes[2].getblockcount())
357355

358356
# check that wallet loads successfully when restarting a pruned node after IBD.
359357
# this was reported to fail in #7494.
360358
self.restart_node(5, extra_args=["-prune=550", "-blockfilterindex=1"]) # restart to trigger rescan
361359

362-
wallet_info = self.nodes[5].getwalletinfo()
363-
self.wait_until(lambda: wallet_info["scanning"] == False)
364-
self.wait_until(lambda: wallet_info["lastprocessedblock"]["height"] == self.nodes[0].getblockcount())
360+
self.wait_until(lambda: self.nodes[5].getwalletinfo()["scanning"] == False)
361+
self.wait_until(lambda: self.nodes[5].getwalletinfo()["lastprocessedblock"]["height"] == self.nodes[0].getblockcount())
365362

366363
def run_test(self):
367364
self.log.info("Warning! This test requires 4GB of disk space")

0 commit comments

Comments
 (0)