pytest: restore bookkeeper to recover tests.
What changed, and why it matters
This commit only changes test code. It removes temporary workarounds that disabled the 'bookkeeper' plugin during three recovery-related tests, because the underlying code now handles database removal correctly. There is no change to production code and no security issue is introduced or fixed here.
No security action required. This is a test-only cleanup commit. Reviewers may want to confirm the referenced bookkeeper fix is present in the production code base, but that fix is outside the scope of this commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/test_misc.py to remove the ‘disable-plugin’: ‘bookkeeper’ option from test_emergencyrecoverpenaltytxn, test_emergencyrecover, and test_restorefrompeer. These options were FIXME workarounds because the bookkeeper plugin previously became upset when test fixtures removed part of its database. The commit message states the bookkeeper now handles db removal, so the workarounds are removed to restore test coverage. No production code is changed.
Changed components
tests/test_misc.pyInspect captured patch +2 / −8
diff --git a/tests/test_misc.py b/tests/test_misc.py
index f0636285..5832787a 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -2989,8 +2989,6 @@ def test_emergencyrecoverpenaltytxn(node_factory, bitcoind):
l1, l2 = node_factory.get_nodes(2, [{'broken_log': r"onchaind-chan#[0-9]*: Could not find resolution for output .*: did \*we\* cheat\?",
'may_reconnect': True,
'allow_bad_gossip': True,
- # FIXME: Gets upset when we remove half its data!
- 'disable-plugin': 'bookkeeper',
'rescan': 10},
{'broken_log': r"onchaind-chan#[0-9]*: Could not find resolution for output .*: did \*we\* cheat\?",
'may_reconnect': True}])
@@ -3048,9 +3046,7 @@ def test_emergencyrecover(node_factory, bitcoind):
Test emergencyrecover
"""
l1, l2 = node_factory.get_nodes(2, opts=[{'may_reconnect': True,
- 'broken_log': 'ERROR: Unknown commitment #.*, recovering our funds',
- # FIXME: Gets upset when we remove half its data!
- 'disable-plugin': 'bookkeeper'},
+ 'broken_log': 'ERROR: Unknown commitment #.*, recovering our funds'},
{'may_reconnect': True}])
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
@@ -3152,9 +3148,7 @@ def test_restorefrompeer(node_factory, bitcoind):
"""
l1, l2 = node_factory.get_nodes(2, [{'broken_log': 'ERROR: Unknown commitment #.*, recovering our funds!',
'may_reconnect': True,
- 'allow_bad_gossip': True,
- # FIXME: Gets upset when we remove half its data!
- 'disable-plugin': 'bookkeeper'},
+ 'allow_bad_gossip': True},
{'may_reconnect': True}])
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
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.