diff options
author | John Newbery <john@johnnewbery.com> | 2021-06-16 10:56:07 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-07-09 17:24:08 +0100 |
commit | cd48372b67d961fe661990a2c6d3cc3d91478924 (patch) | |
tree | b59c707f859bb7f4ae995b3b6221d21156d14902 /test/functional | |
parent | 847b6ed48d7bacec9024618922e9b339d2d97676 (diff) |
[mempool] Allow rebroadcast for same-txid-different-wtxid transactions
This commit fixes some slightly unexpected behaviour when:
- there is already transaction in the mempool (the "mempool tx")
- BroadcastTransaction() is called for a transaction with the same txid
as the mempool transaction but a different witness (the "new tx")
Prior to this commit, if BroadcastTransaction() is called with
relay=true, then it'll call RelayTransaction() using the txid/wtxid of
the new tx, not the txid/wtxid of the mempool tx. For wtxid relay peers,
in SendMessages(), the wtxid of the new tx will be taken from
setInventoryTxToSend, but will then be filtered out from the vector of
wtxids to announce, since m_mempool.info() won't find the transaction
(the mempool contains the mempool tx, which has a different wtxid from
the new tx).
Fix this by calling RelayTransaction() with the wtxid of the mempool
transaction in this case.
Diffstat (limited to 'test/functional')
0 files changed, 0 insertions, 0 deletions