pytest: don't get upset at slow multi-input signing under valgrind.
What changed, and why it matters
This is a test-only change. A developer made a test more tolerant of slow performance when the code is run under a debugging/performance-analysis tool called valgrind. It does not change the actual wallet or signing code, so it has no security impact on users.
No action required. This is a benign test-hardening change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies tests/test_wallet.py to add broken_log=”That’s weird: Request signpsbt took” when creating a node in test_txsend. This suppresses a pytest failure when the signpsbt JSON-RPC call exceeds 5 seconds under valgrind, which is expected due to valgrind’s instrumentation overhead during multi-input signing. The production signing logic is unchanged.
Changed components
tests/test_wallet.pyInspect captured patch +2 / −1
diff --git a/tests/test_wallet.py b/tests/test_wallet.py
index 967a7f9..a9a86f0 100644
--- a/tests/test_wallet.py
+++ b/tests/test_wallet.py
@@ -1225,7 +1225,8 @@ def test_sign_and_send_psbt(node_factory, bitcoind, chainparams):
@unittest.skipIf(TEST_NETWORK == 'liquid-regtest', "BIP86 random_hsm not compatible with liquid-regtest bech32")
def test_txsend(node_factory, bitcoind, chainparams):
amount = 1000000
- l1 = node_factory.get_node(random_hsm=True)
+ # Under valgrind, we can actually take 5 seconds to sign multiple inputs!
+ l1 = node_factory.get_node(random_hsm=True, broken_log="That's weird: Request signpsbt took")
addr = chainparams['example_addr']
# Add some funds to withdraw later
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.