SendMoney: use already-calculated balance #9165

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:triv-curbal changing 1 files +1 −1
  1. instagibbs commented at 6:01 PM on November 15, 2016: member

    No description provided.

  2. SendMoney: use already-calculated balance ea83d0098a
  3. sipa commented at 6:16 PM on November 15, 2016: member

    utACK ea83d0098a2eb29a3b1398f3ecf907f7eece1eee

    (I wouldn't classify this as trivial though, it actually changes the executed code).

  4. instagibbs commented at 6:20 PM on November 15, 2016: member

    True, which is why I made sure to run the tests. Changed.

  5. instagibbs renamed this:
    [trivial] SendMoney: use already-calculated balance
    SendMoney: use already-calculated balance
    on Nov 15, 2016
  6. dcousens approved
  7. fanquake added the label Wallet on Nov 16, 2016
  8. mrbandrews commented at 6:43 PM on November 17, 2016: contributor

    If you were inclined, you could add the following test at line 87 of wallet.py: assert_raises_message(JSONRPCException, "requires a transaction fee", self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20.99999999) Otherwise, ACK

  9. Jamielee11 approved
  10. morcos commented at 4:46 PM on November 28, 2016: member

    utACK

  11. gmaxwell commented at 8:01 PM on December 4, 2016: contributor

    utACK

  12. jonasschnelli commented at 8:05 PM on December 4, 2016: contributor

    CWalletTx uses a cache for the GetAvailableCredit(), but right, GetBalance should only be called if really necessary because of the loop under the lock through mapWallet and the isTrusted() calls.

    utACK ea83d0098a2eb29a3b1398f3ecf907f7eece1eee

  13. laanwj merged this on Dec 5, 2016
  14. laanwj closed this on Dec 5, 2016

  15. laanwj referenced this in commit c01f16aaa0 on Dec 5, 2016
  16. codablock referenced this in commit e17348cfa3 on Jan 16, 2018
  17. codablock referenced this in commit 4900f82349 on Jan 16, 2018
  18. codablock referenced this in commit 386026e570 on Jan 17, 2018
  19. andvgal referenced this in commit 0e2360d8ad on Jan 6, 2019
  20. CryptoCentric referenced this in commit 98f1b9434e on Feb 25, 2019
  21. 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: 2026-04-21 15:15 UTC

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