#35893 test: cover submitpackage other-wtxid for same-txid-diff-witness
https://github.com/bitcoin/bitcoin/pull/35893 · · +31/-0 in 1 files, 1 commits · labels: Tests
Goal
- Add functional test coverage for submitpackage response formatting
- Protects against regressions when a package transaction shares a txid with a mempool entry
This PR adds a functional test case to test/functional/rpc_packages.py verifying that submitpackage returns other-wtxid when attempting to submit a transaction whose txid matches an existing mempool transaction with a different witness.
Problem: While the underlying mempool behavior had unit test coverage, the RPC layer's JSON response structure for this scenario was not covered by any functional test.
Category: RPC / REST / ZMQ (#40 of 52)
P3 · test coverage
- P3 because it pins documented JSON response formats for package submissions
- Ensures RPC clients do not encounter silent compatibility regressions
Pins documented RPC response structure for package submission under same-txid-different-witness conditions, ensuring JSON compatibility does not regress.
Membership: Touches test/functional/rpc_packages.py to test the JSON-RPC response format of submitpackage.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 0
Reviewability: Ready
- Ready for review, small patch with passing CI
The patch is small, CI is passing, and the only reviewer suggestion has been addressed and re-ACKed.
Author status: active
Resolved concerns:
- jeanpablojp noted an unnecessary parent transaction generation step, which the author removed in a force push.
Agreement: Positive
- Positive sentiment with no outstanding concerns
- Concept approval without stated reasons (instagibbs)
- Verified by testing after addressing cleanup feedback (jeanpablojp)
Concept ACK and tested ACK with no outstanding objections.
The PR has received positive engagement from two contributors with no dissent.
- instagibbs gave a concept ACK.
- jeanpablojp tested the PR and re-ACKed after the author removed an unnecessary step.
Review verdicts (DrahtBot): 1
- ACK: jeanpablojp
Files
31 lines under test/bench/ci.
- test/functional/rpc_packages.py +31/-0
Card
This pull request adds functional test coverage in rpc_packages.py for submitpackage when encountering a same-txid-different-witness transaction. It ensures the JSON response properly surfaces the other-wtxid field matching the transaction already in the mempool. Review is straightforward and in a clean state, with a concept ACK and a tested re-ACK following a minor cleanup.