Skip to content

Parameterize the p2p fixture handshake relay flag. - #8

Closed
echennells wants to merge 1 commit into
masterfrom
relay-handshake-argument
Closed

Parameterize the p2p fixture handshake relay flag.#8
echennells wants to merge 1 commit into
masterfrom
relay-handshake-argument

Conversation

@echennells

Copy link
Copy Markdown
Owner

handshake sends relay=false, and session_peer attaches the transaction protocols only when the peer's version sets relay, so no test can reach protocol_transaction_out_106 or protocol_transaction_in_106.

Adds a relay argument defaulted to the current value, so existing cases are unchanged.

peer_setup_fixture in libbitcoin-network has the same literal.

@echennells

Copy link
Copy Markdown
Owner Author

Closing — subsumed, and this branch got there first.

The relay parameter on p2p_setup_fixture::handshake is included verbatim in the not_found rework (notfound-70001, now the head of libbitcoin#1106): same signature, same relay=false default, same out.relay = relay.

It is needed there because protocol_transaction_out_70001 only attaches when the peer's version carries the relay flag, so without this parameter the transaction half of not_found cannot be exercised by a test at all. libbitcoin#1106 uses it for functional_p2p__get_data__unknown_transaction__not_found.

Nothing is lost by closing; the change ships as part of that PR.

@echennells echennells closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant