fix for #952 (send coins tab glitch) #1189

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:fix#952 changing 1 files +10 −3
  1. Diapolo commented at 12:57 PM on May 3, 2012: none

    Tested on testnet and works as expected (fixes #952), if I send coins and update or set a label for an address it get's updated in the address list, which it did not before.

  2. laanwj commented at 6:33 AM on May 4, 2012: member

    Can you please move the checking logic to WalletModel instead of inside SetAddressBookName? That'd make it an UI-only change and much easier to test.

  3. Diapolo commented at 6:49 AM on May 4, 2012: none

    The question is, if walletmodel.cpp is the only place, where that check makes senes or if it's beneficial to all places in the source? I'm fine if it's only needed in walletmodel.cpp, so can you verify this?

  4. in src/wallet.cpp:None in 1dcb0a3f89 outdated
    1293 | -    AddressBookRepaint();
    1294 | -    if (!fFileBacked)
    1295 | -        return false;
    1296 | -    return CWalletDB(strWalletFile).WriteName(address.ToString(), strName);
    1297 | +    std::map<CBitcoinAddress, std::string>::iterator mi = mapAddressBook.find(address);
    1298 | +    // Check if we have a new address or label
    


    laanwj commented at 7:09 AM on May 4, 2012:

    // Check if we have a new address or updated label

  5. laanwj commented at 7:26 AM on May 4, 2012: member

    Well, it'd be nice to only change only the UI for an UI-only fix.

    Then again, I guess the extra check doesn't hurt (except that it complicates the code a bit).

  6. Diapolo commented at 8:44 AM on May 4, 2012: none

    @laanwj Updated to be a GUI-fix only, is the LOCK in parentheses correct? I get now compiler warning, just want to be sure :)

  7. laanwj commented at 8:46 AM on May 4, 2012: member

    The LOCK is not correct. You need to have the lock before any access to the address book, so also while doing the check.

  8. fix #952 by checking if we have a new address or an updated label dab7acdf45
  9. Diapolo commented at 9:10 AM on May 4, 2012: none

    Alright, the LOCK is now before any access to wallet, locking good now?

  10. laanwj commented at 9:55 AM on May 4, 2012: member

    Yes, it's ok now

  11. laanwj referenced this in commit 46692fc929 on May 6, 2012
  12. laanwj merged this on May 6, 2012
  13. laanwj closed this on May 6, 2012

  14. coblee referenced this in commit 5c99317a71 on Jul 17, 2012
  15. suprnurd referenced this in commit 0e28de7e10 on Dec 5, 2017
  16. lateminer referenced this in commit 2ed4edcfc1 on Jan 22, 2019
  17. lateminer referenced this in commit 129c4744ea on Dec 25, 2019
  18. 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 18:16 UTC

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