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

test: make feature_bind_port_(discover|externalip).py auto-detect the skip condition

Public commit record

What the developer wrote

Authored by Vasil Dimov

95/100 · Strong
test: make feature_bind_port_(discover|externalip).py auto-detect the skip condition

Instead of requiring a run with an explicit `--ihave1111and2222`, detect
whether the routable addresses are set up and if not, then skip the test.

To detect whether the addresses are set use `bitcoind` - start it
and ask it to bind on them and see if it will error with
"Unable to bind". Since this is what the tests do anyway, just start
the nodes and see if an exception will be raised like
`FailedToStartError` / "Unable to bind".

This makes it possible for the CI to run
`feature_bind_port_discover.py` and
`feature_bind_port_externalip.py` by just setting up the
addresses, without having to explicitly provide `--ihave1111and2222`.

Co-authored-by: willcl-ark <will@256k1.dev>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit only changes Bitcoin Core's internal functional test scripts. It removes a manual command-line flag that testers had to pass to skip certain network-binding tests, and instead makes the tests automatically detect whether the required network addresses are available. It also adds a cleanup helper for test nodes that fail to start. There is no change to the Bitcoin node software that users run, no change to consensus rules, networking protocol, wallet handling, or any security-critical code path. It is purely a developer-facing testing improvement.

Recommended action

No security action needed. This is a normal test-framework refactor; review as part of routine QA tooling maintenance.

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.