Use txid as key in mapAlreadyAskedFor #7862

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:inv-to-txid-mapalreadyaskedfor changing 3 files +5 −5
  1. sdaftuar commented at 8:10 PM on April 11, 2016: member

    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.

  2. 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).
    7e91f632c7
  3. dcousens commented at 12:01 AM on April 12, 2016: contributor

    utACK 7e91f63

  4. sipa commented at 2:21 PM on April 12, 2016: member

    utACK 7e91f632c70ff1848a152f24ee67a06796803943

  5. jonasschnelli commented at 7:38 PM on April 12, 2016: contributor

    utACK 7e91f632c70ff1848a152f24ee67a06796803943

  6. jonasschnelli added the label Refactoring on Apr 12, 2016
  7. MarcoFalke commented at 9:51 AM on April 13, 2016: member

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

  8. sdaftuar commented at 6:11 PM on April 13, 2016: member

    @MarcoFalke Agreed, thanks for pointing that out.

  9. laanwj added the label Needs backport on Apr 14, 2016
  10. laanwj commented at 12:54 PM on April 14, 2016: member

    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

  11. laanwj merged this on Apr 14, 2016
  12. laanwj closed this on Apr 14, 2016

  13. laanwj referenced this in commit 97d0b9889f on Apr 14, 2016
  14. MarcoFalke referenced this in commit a53261831b on Apr 25, 2016
  15. MarcoFalke referenced this in commit 7e71785c40 on Apr 27, 2016
  16. MarcoFalke commented at 10:58 AM on June 9, 2016: member

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

  17. MarcoFalke removed the label Needs backport on Jun 9, 2016
  18. thokon00 referenced this in commit 29a669fa68 on Jun 28, 2016
  19. nomnombtc referenced this in commit 524b730d3f on Nov 12, 2016
  20. nomnombtc referenced this in commit d2d1e5871d on Nov 12, 2016
  21. nomnombtc referenced this in commit 92cb62f3e9 on Nov 13, 2016
  22. sickpig referenced this in commit 1a9f60b5bd on Nov 14, 2016
  23. zkbot referenced this in commit 65dff184f6 on Aug 4, 2021
  24. zkbot referenced this in commit 6f38962577 on Aug 5, 2021
  25. zkbot referenced this in commit 1aa59fd4ac on Aug 5, 2021
  26. zkbot referenced this in commit 8c3d670c8a on Aug 9, 2021
  27. zkbot referenced this in commit 1dc1ababa9 on Aug 9, 2021
  28. zkbot referenced this in commit 18fe0a377b on Aug 9, 2021
  29. zkbot referenced this in commit 1cb1ed2653 on Aug 10, 2021
  30. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 12:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me