-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Use txid as key in mapAlreadyAskedFor #7862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use txid as key in mapAlreadyAskedFor #7862
Conversation
Previously we used the CInv that would be sent to the peer announcing the transaction as the key, but using the txid instead allows us to decouple the p2p layer from the application logic (which relies on this map to avoid duplicate tx requests).
|
utACK 7e91f63 |
|
utACK 7e91f63 |
|
utACK 7e91f63 |
1 similar comment
|
utACK 7e91f63 |
|
Should be tagged with "Backport 0.12.2" if this is meant for segwit. |
|
@MarcoFalke Agreed, thanks for pointing that out. |
|
Makes sense to me. |
7e91f63 Use txid as key in mapAlreadyAskedFor (Suhas Daftuar)
Previously we used the CInv that would be sent to the peer announcing the transaction as the key, but using the txid instead allows us to decouple the p2p layer from the application logic (which relies on this map to avoid duplicate tx requests). Github-Pull: bitcoin#7862 Rebased-From: 7e91f63
|
Backported as part of #7938. Removing label 'Needs backport'. |
Previously we used the CInv that would be sent to the peer announcing the transaction as the key, but using the txid instead allows us to decouple the p2p layer from the application logic (which relies on this map to avoid duplicate tx requests). Github-Pull: bitcoin#7862 Rebased-From: 7e91f63
ZIP 239 preparations 1 This is the first of several backports to prepare for ZIP 239. The primary change is altering `mapRelay` to store `CTransaction`s, which we need because ZIP 239 requires changing `Inv` messages based on transaction versions. The other changes are mainly for conflict removal but are also independently useful. Backports the following upstream PRs: - bitcoin/bitcoin#6889 - bitcoin/bitcoin#7125 - bitcoin/bitcoin#7862 - bitcoin/bitcoin#7877
ZIP 239 preparations 1 This is the first of several backports to prepare for ZIP 239. The primary change is altering `mapRelay` to store `CTransaction`s, which we need because ZIP 239 requires changing `Inv` messages based on transaction versions. The other changes are mainly for conflict removal but are also independently useful. Backports the following upstream PRs: - bitcoin/bitcoin#6889 - bitcoin/bitcoin#7125 - bitcoin/bitcoin#7862 - bitcoin/bitcoin#7877
ZIP 239 preparations 1 This is the first of several backports to prepare for ZIP 239. The primary change is altering `mapRelay` to store `CTransaction`s, which we need because ZIP 239 requires changing `Inv` messages based on transaction versions. The other changes are mainly for conflict removal but are also independently useful. Backports the following upstream PRs: - bitcoin/bitcoin#6889 - bitcoin/bitcoin#7125 - bitcoin/bitcoin#7862 - bitcoin/bitcoin#7877
Previously we used the
CInvthat would be sent to the peer announcing the transaction as the key, but using the txid instead allows us to decouple the p2p layer from the application logic.This is a minor preparatory commit for segwit, in which the inv-type will no longer be the same for all transaction requests.