diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2020-01-29 14:09:08 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2020-09-24 13:24:10 +0100 |
commit | be1b7a8916fdd060db56846ad5dcec0894aae314 (patch) | |
tree | 1c217bfb7a682a1fc080a8e4be9cc9973dbdf814 /src/validation.h | |
parent | 73845211d16ad1558d84c966ae18e3507fa7dea6 (diff) |
Add wtxids to recentRejects
Previously, we only added txids to recentRejects if we were sure that the
transaction couldn't have had the wrong witness (either because the witness was
malleated or stripped).
In preparation for wtxid-based relay, we can observe that txid == wtxid for
transactions that have no witness, and add the wtxid of rejected transactions,
provided the transaction wasn't a witness-stripped one. This means that we now
add more data to the filter (as prior to this commit, any transaction with a
witness that failed to be accepted was being skipped for inclusion in the
filter) but witness malleation should still not interfere with relay of a valid
segwit transaction, because the txid of a segwit transaction would not be added
to the filter after failing validation.
In the future, having wtxids in the recent rejects filter will allow us to
skip downloading the same wtxid multiple times, once our peers use wtxids for
transaction relay.
Also add the txid to recentRejects if the transaction failed for
TX_INPUTS_NOT_STANDARD.
Diffstat (limited to 'src/validation.h')
0 files changed, 0 insertions, 0 deletions