The specific behaviour tied to the // TODO: allow witness replacement in packages. had no functional test anywhere, just the unit test coverage, showing the underlying mempool logic and not the RPC's actual JSON output.
This test submits a same-txid-different-witness transaction via submitpackage while its counterpart is already in the mempool, and asserts submitpackage correctly reports other-wtxid pointing at the transaction already in the mempool, its existing, documented behavior, not something this change introduces.
Verified the test can actually fail by temporarily asserting the wrong wtxid and confirmed it fails as expected.
test: cover submitpackage other-wtxid for same-txid-diff-witness #35893
pull mercie-ux wants to merge 1 commits into bitcoin:master from mercie-ux:test-submitpackage-other-wtxid changing 1 files +31 −0-
mercie-ux commented at 6:50 AM on August 5, 2026: contributor
- DrahtBot added the label Tests on Aug 5, 2026
-
DrahtBot commented at 6:50 AM on August 5, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35893.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process.
Type Reviewers ACK jeanpablojp, sedited, instagibbs If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
instagibbs commented at 1:55 PM on August 9, 2026: member
concept ack
-
jeanpablojp commented at 1:04 AM on August 12, 2026: contributor
tACK ec8a53618ebb4c71f4f71ba282fb990e45e413fc
-
9054f7cde4
test: cover submitpackage other-wtxid for same-txid-diff-witness
The specific behaviour tied to the `// TODO: allow witness replacement in packages.` had no functional test anywhere, just the unit test coverage, showing the underlying mempool logic and not the RPC's actual JSON output. This test submits a same-txid-different-witness transaction via `submitpackage` while its counterpart is already in the mempool, and asserts `submitpackage` correctly reports `other-wtxid` pointing at the transaction already in the mempool, its existing, documented behavior, not something this change introduces. Verified the test can actually fail by temporarily asserting the wrong wtxid and confirmed it fails as expected.
-
in test/functional/rpc_packages.py:113 in ec8a53618e
108 | + rebalance_parent_output_amount=parent_amount, 109 | + child_amount=child_amount, 110 | + ) 111 | + 112 | + self.wallet.sendrawtransaction(from_node=node, tx_hex=parent.serialize().hex()) 113 | + self.generate(node, 1)
jeanpablojp commented at 1:04 AM on August 12, 2026:this block isn't needed, the mempool takes child_one on the unconfirmed parent; deleted the line and re-ran to check. feel free to ignore
mercie-ux commented at 3:37 AM on August 12, 2026:removed it, thanks
mercie-ux commented at 3:38 AM on August 12, 2026:removed it, thanks
mercie-ux force-pushed on Aug 12, 2026jeanpablojp commented at 8:59 AM on August 12, 2026: contributorreACK 9054f7cde43a264300bb0567215bda5f55803ae5
sedited approvedsedited commented at 2:06 PM on September 23, 2026: contributorACK 9054f7cde43a264300bb0567215bda5f55803ae5
fanquake requested review from instagibbs on Sep 23, 2026in test/functional/rpc_packages.py:122 in 9054f7cde4
117 | + self.log.info("Submit child_one to the mempool directly") 118 | + node.sendrawtransaction(child_one.serialize().hex()) 119 | + 120 | + self.log.info("Submit child_two via submitpackage; it should be reported as other-wtxid, not an error") 121 | + submitres = node.submitpackage([child_two.serialize().hex()]) 122 | + result = submitres["tx-results"][child_two.wtxid_hex]
instagibbs commented at 4:13 PM on September 23, 2026:when checking results it would be best to check that the mempool was not actually mealleated (child_two wasnt swapped in), and for return fields other things could be asserted
instagibbs approvedinstagibbs commented at 4:13 PM on September 23, 2026: memberACK 9054f7cde43a264300bb0567215bda5f55803ae5
non-blocking comments, coverage is better
fanquake merged this on Sep 23, 2026fanquake closed this on Sep 23, 2026
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-11 10:51 UTC
More mirrored repositories can be found on mirror.b10c.me