Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Use txid as key in mapAlreadyAskedFor #7862

Merged
merged 1 commit into from Apr 14, 2016

Conversation

Projects
None yet
7 participants
Member

sdaftuar commented Apr 11, 2016

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.

This is a minor preparatory commit for segwit, in which the inv-type will no longer be the same for all transaction requests.

Use txid as key in mapAlreadyAskedFor
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).
Contributor

dcousens commented Apr 12, 2016

utACK 7e91f63

Member

theuni commented Apr 12, 2016

utACK 7e91f63

Owner

sipa commented Apr 12, 2016

utACK 7e91f63

Member

jonasschnelli commented Apr 12, 2016

utACK 7e91f63

Member

MarcoFalke commented Apr 13, 2016

Should be tagged with "Backport 0.12.2" if this is meant for segwit.

Member

sdaftuar commented Apr 13, 2016

@MarcoFalke Agreed, thanks for pointing that out.

@sdaftuar sdaftuar referenced this pull request in sipa/bitcoin Apr 13, 2016

Closed

P2P test for segwit #72

Owner

laanwj commented Apr 14, 2016

Makes sense to me. mapAlreadyAskedFor, although the generic name could mislead, is only used for transactions, not blocks, so there is no reason to have anything but the txid in the key at all.
utACK 7e91f63

@laanwj laanwj merged commit 7e91f63 into bitcoin:master Apr 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Apr 14, 2016

Merge #7862: Use txid as key in mapAlreadyAskedFor
7e91f63 Use txid as key in mapAlreadyAskedFor (Suhas Daftuar)

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Apr 27, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63
Member

MarcoFalke commented Jun 9, 2016

Backported as part of #7938. Removing label 'Needs backport'.

zander added a commit to zander/bitcoinclassic that referenced this pull request Jun 16, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63

thokon00 added a commit to faircoin/faircoin that referenced this pull request Jun 28, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 12, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 12, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 13, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63

sickpig added a commit to sickpig/BitcoinUnlimited that referenced this pull request Nov 14, 2016

Use txid as key in mapAlreadyAskedFor
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: #7862
Rebased-From: 7e91f63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment