test: Add missing timeout_factor to zmq socket
What changed, and why it matters
This is a one-line fix in a test script for Bitcoin Core's ZeroMQ (ZMQ) notification interface. It makes a test socket timeout scale with the test framework's configurable slowdown factor, preventing flaky test failures on slow machines. It does not change production code and has no security impact on real Bitcoin nodes or wallets.
No security action needed. Treat as a normal test-quality commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In test/functional/interface_zmq.py, the ZMQ receive timeout was hard-coded as recv_timeout*1000 milliseconds. The patch multiplies it by self.options.timeout_factor, which the test framework uses to lengthen timeouts when tests run on slower environments (e.g., under valgrind or on busy CI). This is a test-only reliability improvement; no node, consensus, networking, or wallet code is modified.
Changed components
test/functional/interface_zmq.pyInspect captured patch +1 / −1
diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py
index 67170076..79882a43 100755
--- a/test/functional/interface_zmq.py
+++ b/test/functional/interface_zmq.py
@@ -174,7 +174,7 @@ class ZMQTest (BitcoinTestFramework):
# set subscriber's desired timeout for the test
for sub in subscribers:
- sub.socket.set(zmq.RCVTIMEO, recv_timeout*1000)
+ sub.socket.set(zmq.RCVTIMEO, int(recv_timeout * self.options.timeout_factor * 1000))
self.connect_nodes(0, 1)
if sync_blocks:
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.