test: look for the wtxid in p2p_blocksonly's block-relay-only inv check #36405

pull fametrano wants to merge 1 commits into bitcoin:master from fametrano:test-blocksonly-wtxid-inv changing 1 files +3 −2
  1. fametrano commented at 8:32 PM on October 1, 2026: contributor

    In blocks_relay_conn_tests, the check that a transaction submitted over RPC is not announced to a block-relay-only peer looks for its txid among the peer's invs. The peer is a P2PTxInvStore, which negotiates wtxidrelay, so an announcement would carry the wtxid. The MiniWallet transaction has a witness, so its txid and wtxid differ, and the check passes whether or not the node announces it.

    This checks the wtxid instead. To see the difference, open that connection as outbound-full-relay: the old check still passes, the new one fails.

    #35920 also edits blocks_relay_conn_tests; the two do not conflict.

    Found while porting these tests to https://github.com/btclib-org/bitcoin-node-tests.

    Made with my usual tools: a computer, the Internet and an LLM. The mistakes, as usual, are all mine.

  2. DrahtBot added the label Tests on Oct 1, 2026
  3. DrahtBot commented at 8:32 PM on October 1, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36257 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36257.svg"></sub> (qa: assert_equals -> assert_true/assert_false by hodlinator)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. fametrano force-pushed on Oct 2, 2026
  5. fametrano force-pushed on Oct 6, 2026
  6. mercie-ux commented at 2:23 PM on October 7, 2026: contributor

    Concept Ack

  7. test: check the wtxid in p2p_blocksonly's block-relay-only inv assertion
    The connection that checks a transaction submitted over RPC is not
    announced to a block-relay-only peer uses P2PTxInvStore, which negotiates
    wtxidrelay. The node would therefore announce the transaction by its
    wtxid, and the assertion looked for the txid, which cannot be in the
    store for a transaction carrying a witness: it passed whether or not the
    transaction was announced.
    
    Assert on the wtxid instead. With the connection opened as
    outbound-full-relay rather than block-relay-only, the old assertion still
    passes and the new one fails.
    0617edd028
  8. fametrano force-pushed on Oct 7, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-08 23:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me