[net] split PushInventory() #19322

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:2020-06-split-push-inventory changing 2 files +16 −15
  1. jnewbery commented at 7:43 PM on June 18, 2020: member

    PushInventory() is currently called with a CInv object, which can be a MSG_TX or MSG_BLOCK. PushInventory() only uses the type to determine whether to add the hash to setInventoryTxToSend or vInventoryBlockToSend.

    Since the caller always knows what type of inventory they're pushing, the CInv is wastefully constructed and thrown away, and tx/block relay is being split out, we split the function into PushTxInventory() and PushBlockInventory().

  2. [net] split PushInventory()
    PushInventory() is currently called with a CInv object, which can be a
    MSG_TX or MSG_BLOCK. PushInventory() only uses the type to determine
    whether to add the hash to setInventoryTxToSend or
    vInventoryBlockToSend.
    
    Since the caller always knows what type of inventory they're pushing,
    the CInv is wastefully constructed and thrown away, and tx/block relay
    is being split out, we split the function into PushTxInventory() and
    PushBlockInventory().
    f52d403b81
  3. jnewbery force-pushed on Jun 18, 2020
  4. MarcoFalke commented at 7:55 PM on June 18, 2020: member

    Concept ACK

  5. MarcoFalke added the label Refactoring on Jun 18, 2020
  6. MarcoFalke added the label P2P on Jun 18, 2020
  7. amitiuttarwar commented at 9:57 PM on June 18, 2020: contributor

    utACK f52d403b81. nice cleanup, this has bothered me :)

  8. fanquake requested review from naumenkogs on Jun 19, 2020
  9. naumenkogs commented at 6:40 AM on June 19, 2020: member

    utACK f52d403

  10. naumenkogs approved
  11. sipa commented at 7:10 AM on June 19, 2020: member

    utACK f52d403b81e758e9bc33847560b5740b22d95fff

  12. fanquake merged this on Jun 19, 2020
  13. fanquake closed this on Jun 19, 2020

  14. jonatack commented at 10:59 AM on June 19, 2020: member

    Concept ACK, good idea

  15. jnewbery deleted the branch on Jun 19, 2020
  16. deadalnix referenced this in commit 1089bd0c18 on Feb 9, 2021
  17. zkbot referenced this in commit 1d7ed06174 on Aug 13, 2021
  18. zkbot referenced this in commit 56b5f95897 on Aug 17, 2021
  19. DrahtBot locked this on Feb 15, 2022

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-22 06:14 UTC

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