(UI) Persistently poll for balance change when number of blocks changed #1575

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2012_07_persistentbalancecheck changing 1 files +10 −15
  1. laanwj commented at 1:31 PM on July 10, 2012: member

    Fixes #1452.

    Until we can make the logic water-tight and are notified in every case the balance might have changed (either due to blocks maturing, or outputs spent), remove the premature optimization and simply recompute the balance every half a second when the number of blocks changed.

    Shouldn't make any impact on performance in practice.

  2. Diapolo commented at 4:34 PM on July 10, 2012: none

    If this works very cool, currently preparing a test!

    One thing (unrelated to the problem), could you harmonize the order in checkBalanceChanged() and updateTransaction() when the emit is called. Either first update the vars and then emit or first emit the signal and then update the vars. I dislike such small coding discrepances, can't help.

  3. Persistently poll for balance change when number of blocks changed
    Fixes #1452. Until we can make the logic water-tight *and* are notified in every
    case the balance might have changed, remove the premature optimization and
    simply recompute the balance every half a second when the number of blocks changed.
    2e00b8fbd9
  4. laanwj commented at 7:02 AM on July 11, 2012: member

    Changed the order. It indeed makes sense to first update the variables and then emit the signal, so that calls to getXXX in the signal handler return the new value.

  5. Diapolo commented at 9:23 AM on July 11, 2012: none

    I currently can't verify as my testnet coins are immature, so I can't empty my wallet -_-.

  6. Diapolo commented at 11:45 AM on July 13, 2012: none

    I made a test on testnet, which was succesfull a day ago and a few seconds ago on a mainnet wallet, which also works like expected. Amounts get cleanly updated.

    ACK

  7. laanwj referenced this in commit 916b11fba5 on Jul 13, 2012
  8. laanwj merged this on Jul 13, 2012
  9. laanwj closed this on Jul 13, 2012

  10. nifgraup referenced this in commit ec9e3821ab on Mar 30, 2014
  11. laanwj deleted the branch on Apr 9, 2014
  12. suprnurd referenced this in commit b9c67258ba on Dec 5, 2017
  13. lateminer referenced this in commit f16125b83d on May 6, 2020
  14. lateminer referenced this in commit 3d36502c3a on May 6, 2020
  15. lateminer referenced this in commit e99a18e410 on May 6, 2020
  16. 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-13 15:16 UTC

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