tx pool: Avoid passing redundant hash into addUnchecked (scripted-diff) #13792

pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:Mf1808-constTxPoolEntries changing 8 files +90 −93
  1. MarcoFalke commented at 1:21 am on July 29, 2018: member

    Several years ago the transaction hash was not cached. For optimization the hash was instead passed into addUnchecked to avoid re-calculating it. See f77654a0e9424f13cad04f82c014abd78fbb5e38

    Passing in the hash is now redundant and the argument can safely be removed.

  2. MarcoFalke force-pushed on Jul 29, 2018
  3. MarcoFalke force-pushed on Jul 29, 2018
  4. MarcoFalke force-pushed on Jul 29, 2018
  5. DrahtBot commented at 2:17 am on July 29, 2018: member
    • #13922 (Lower default relay fees by ajtowns)
    • #13793 (tx pool: Use class methods to hide raw map iterator impl details by MarcoFalke)
    • #13558 (Drop unused GetType() from CSizeComputer by Empact)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. fanquake added the label Refactoring on Jul 29, 2018
  7. DrahtBot added the label Needs rebase on Jul 29, 2018
  8. fanquake commented at 12:39 pm on July 29, 2018: member
    Looks like the scripted-diff is failing because of the other whitespace/formatting changes also included in 8c9d589.
  9. Mark CTxMemPoolEntry members that should not be modified const ddd395f968
  10. tx pool: Use the entry's hash instead of the one passed to addUnchecked fe5c49766c
  11. MarcoFalke force-pushed on Jul 30, 2018
  12. MarcoFalke force-pushed on Jul 30, 2018
  13. scripted-diff: Remove unused first argument to addUnchecked
    -BEGIN VERIFY SCRIPT-
    git grep -l addUnchecked | xargs sed --regexp-extended -i -e 's/addUnchecked\([^)][^,]+,\s*/addUnchecked(/g'
    -END VERIFY SCRIPT-
    fa587773e5
  14. MarcoFalke force-pushed on Jul 30, 2018
  15. fanquake removed the label Needs rebase on Jul 30, 2018
  16. MarcoFalke force-pushed on Jul 30, 2018
  17. MarcoFalke force-pushed on Jul 30, 2018
  18. MarcoFalke renamed this:
    tx pool: Avoid passing redundant hash into addUnchecked
    tx pool: Avoid passing redundant hash into addUnchecked (scripted-diff)
    on Jul 30, 2018
  19. MarcoFalke commented at 8:47 pm on July 30, 2018: member
    This is split off of #13804, but not required. So if people hate this kind of refactoring, I am happy to drop it.
  20. MarcoFalke deleted a comment on Jul 30, 2018
  21. promag commented at 3:10 pm on July 31, 2018: member
    utACK fa58777. I like the change, passing entry is now enough. Could update OP now that #13786 is merged.
  22. practicalswift commented at 7:50 am on August 2, 2018: contributor
    Concept ACK
  23. Empact commented at 6:50 pm on August 2, 2018: member
    utACK fa58777
  24. laanwj commented at 2:26 pm on August 29, 2018: member
    utACK fe5c49766c0dc5beaf186d77b568361242b20d5e removing the redundancy is good because it avoids a potential bug when passing in the wrong hash
  25. laanwj merged this on Aug 29, 2018
  26. laanwj closed this on Aug 29, 2018

  27. laanwj referenced this in commit 888acefa5e on Aug 29, 2018
  28. MarcoFalke deleted the branch on Aug 29, 2018
  29. domob1812 referenced this in commit 17ad1ad885 on Sep 3, 2018
  30. Munkybooty referenced this in commit 6af58ab739 on Jun 30, 2021
  31. PastaPastaPasta referenced this in commit 0c8bd25b6d on Jul 18, 2021
  32. PastaPastaPasta referenced this in commit d1484c4fc8 on Jul 18, 2021
  33. PastaPastaPasta referenced this in commit a9a707b556 on Jul 18, 2021
  34. PastaPastaPasta referenced this in commit 94aa3bbac0 on Jul 19, 2021
  35. PastaPastaPasta referenced this in commit 221e8f6dc6 on Jul 19, 2021
  36. DrahtBot 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: 2024-12-18 15:12 UTC

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