test/doc: remove misleading comment and improve tests
What changed, and why it matters
This commit only touches documentation and test code. It removes an outdated comment about how pruned nodes track partially downloaded blocks and fixes a timing bug in a test where wallet status was being checked from a stale snapshot instead of live data. There are no changes to production code, no security fix, and no vulnerability.
No security action needed. Treat as normal test/documentation maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change deletes a misleading Doxygen comment for m_blocks_unlinked in src/node/blockstorage.h and updates test/functional/feature_pruning.py to call getwalletinfo() inside the wait_until lambdas rather than capturing a stale wallet_info object. This ensures the test polls current wallet state during rescan waits. No consensus, networking, wallet, or storage logic is modified.
Changed components
src/node/blockstorage.h (comment only)test/functional/feature_pruning.py (test-only polling fix)Inspect captured patch +4 / −8
diff --git a/src/node/blockstorage.h b/src/node/blockstorage.h
index 347dbc3c..f9c5753b 100644
--- a/src/node/blockstorage.h
+++ b/src/node/blockstorage.h
@@ -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;
diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py
index 0487a138..4a0b3346 100755
--- a/test/functional/feature_pruning.py
+++ b/test/functional/feature_pruning.py
@@ -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")
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.