AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36440: test: speed up functional tests by removing avoidable waits

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36440: test: speed up functional tests by removing avoidable waits

8dc80cafa2ee5932c9ff499c02d6ab8e3cf2f5ef test: wake p2p wait_until on message delivery instead of polling (ViniciusCestarii)
10cfeb33357c937ddd9f588a35e0f8f33abd6ece test: set noban_tx_relay to speed up slow tx relay tests (ViniciusCestarii)

Pull request description:

Reduce functional test runtime:

- set noban_tx_relay = True for tests that can benefit from it.
- wake P2PInterface.wait_until as soon as a message is delivered or the connection state changes, instead of polling every 50ms.

Tested on my x86-64 machine:

Wall time (-j=18): 110.8s to 99.1s (-11%)
Accumulated: 1715s to 1411s (-17.5%)

Tests that were most affected:

| test | before | after |
|---|---|---|
| feature_maxuploadtarget | 57.9s | 6.2s |
| wallet_conflicts | 49.2s | 7.0s |
| p2p_sendheaders | 31.1s | 6.8s |
| p2p_compactblocks | 11.1s | 1.7s |
| wallet_orphanedreward | 9.3s | 5.2s |
| wallet_importprunedfunds | 4.9s | 2.9s |

ACKs for top commit:
maflcko:
review ACK 8dc80cafa2ee5932c9ff499c02d6ab8e3cf2f5ef 🏏
w0xlt:
ACK 8dc80cafa2ee5932c9ff499c02d6ab8e3cf2f5ef

Tree-SHA512: e01654de189d33957e5c9794c3be0aad08a1628480af11ab2365bd6c8b5d6e1130e561fa85380e2b23daad21248993a5658f1740d9d03d1fe5485eef0a9c3851
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit only changes Bitcoin Core's functional test framework to make tests run faster. It replaces a slow polling wait with an event-driven notification and enables a test-only peer-whitelist flag for transaction relay. There is no change to production node code, no user-facing behavior change, and no security issue.

Recommended action

No security action required. This is a test-framework performance improvement. Normal code-review approval is sufficient.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.