Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings #10500

pull ryanofsky wants to merge 1 commits into bitcoin:master from ryanofsky:pr/wtxcopy changing 1 files +4 −4
  1. ryanofsky commented at 3:57 pm on June 1, 2017: member
  2. Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings b9b814a38e
  3. fanquake added the label Wallet on Jun 1, 2017
  4. in src/wallet/wallet.cpp:3266 in b9b814a38e
    3260@@ -3261,9 +3261,9 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
    3261 
    3262     {
    3263         LOCK(cs_wallet);
    3264-        BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
    3265+        for (const auto& walletEntry : mapWallet)
    3266         {
    3267-            CWalletTx *pcoin = &walletEntry.second;
    3268+            const CWalletTx *pcoin = &walletEntry.second;
    


    benma commented at 4:43 pm on June 1, 2017:
    personal preference, just in case you agree: I’d use const CWalletTX& pcoin = walletEntry.second; instead.

    ryanofsky commented at 2:11 pm on June 2, 2017:

    personal preference, just in case you agree: I’d use const CWalletTX& pcoin = walletEntry.second; instead.

    I’d be fine with this change, but I’m not so motivated to implement it myself, and kind of think it would sidetrack the pr which right now is very simple.


    benma commented at 2:17 pm on June 2, 2017:
    Yeah, no biggie ;)
  5. benma commented at 4:43 pm on June 1, 2017: none
    utACK b9b814a38ee768ec8a902544722b81c4b9866834
  6. MarcoFalke commented at 10:23 am on June 2, 2017: member
    utACK b9b814a38ee768ec8a902544722b81c4b9866834
  7. sipa commented at 6:32 pm on June 2, 2017: member
    utACK b9b814a38ee768ec8a902544722b81c4b9866834
  8. sipa merged this on Jun 2, 2017
  9. sipa closed this on Jun 2, 2017

  10. sipa referenced this in commit 098b01dc58 on Jun 2, 2017
  11. practicalswift referenced this in commit 4e4cc78313 on Jun 4, 2017
  12. schancel referenced this in commit ff61577d2a on Jun 9, 2019
  13. PastaPastaPasta referenced this in commit 1a0dc73e68 on Jun 20, 2019
  14. PastaPastaPasta referenced this in commit ab9eda2ec8 on Jun 20, 2019
  15. PastaPastaPasta referenced this in commit 146410f7ad on Jun 22, 2019
  16. PastaPastaPasta referenced this in commit 905905eaa6 on Jun 22, 2019
  17. PastaPastaPasta referenced this in commit a73bf37557 on Jun 22, 2019
  18. PastaPastaPasta referenced this in commit 2c4750b771 on Jun 22, 2019
  19. PastaPastaPasta referenced this in commit e01e6d135e on Jun 22, 2019
  20. PastaPastaPasta referenced this in commit 5fdeca49a3 on Jun 22, 2019
  21. PastaPastaPasta referenced this in commit 48c582a648 on Jun 22, 2019
  22. PastaPastaPasta referenced this in commit ef36e904c0 on Jun 22, 2019
  23. PastaPastaPasta referenced this in commit cc4c00e94b on Jun 22, 2019
  24. PastaPastaPasta referenced this in commit 4d64daa4c3 on Jun 22, 2019
  25. PastaPastaPasta referenced this in commit f59e5e67f0 on Jun 26, 2019
  26. jtoomim referenced this in commit 21fe658b6e on Jun 29, 2019
  27. jonspock referenced this in commit a3407bfe7c on Jul 4, 2019
  28. jonspock referenced this in commit 2c1056d027 on Jul 4, 2019
  29. proteanx referenced this in commit 4d52f0671d on Jul 5, 2019
  30. jonspock referenced this in commit 0b4a16fa7a on Jul 9, 2019
  31. barrystyle referenced this in commit 5d2c975041 on Jan 22, 2020
  32. random-zebra referenced this in commit 2d50b6e3b9 on Jun 9, 2021
  33. 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: 2024-12-22 21:12 UTC

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