Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35917. ReviewsSee the guideline and AI policy for information on the review process. |
cf9103f to
f088ba0
Compare
|
imo we should drop invalid bip144 inv types, aka MSG_WITNESS_TX along with this change if you want to do it. Then you only have wtxid for witness relay peers, and txid for non-witness peers |
f088ba0 to
b2f8959
Compare
If we get a hit across wtxid and txid relay, then it just means this is a legacy transaction and deduping is fine. Therefore using two sets for the purpose of deduplication is overkill and we can simplify this code.
|
Right EDIT: Dropped the additional motivation from commit message and OP, i think the initial motivation stands on its own. |
|
The runtime cost of having a redundant empty set on the stack (for peers that don't send MSG_WITNESS_TX invs) is near enough to 0 to not matter IMO; and for peers that do send |
|
Ok, fair enough. Seems like the taste consensus here would be to go with a clear behaviour change instead. I may do that in the future, and cherry-pick that change on top, but i think it should be a separate PR. |
If we get a hit across wtxid and txid relay, then it just means this is a legacy transaction and deduping is fine.
Therefore using two sets for the purpose of deduplication is overkill and we can simplify this code.