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.
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-
Diapolo commented at 12:57 PM on May 3, 2012: none
-
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.
-
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?
-
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
laanwj commented at 7:26 AM on May 4, 2012: memberWell, 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).
laanwj commented at 8:46 AM on May 4, 2012: memberThe LOCK is not correct. You need to have the lock before any access to the address book, so also while doing the check.
fix #952 by checking if we have a new address or an updated label dab7acdf45Diapolo commented at 9:10 AM on May 4, 2012: noneAlright, the LOCK is now before any access to wallet, locking good now?
laanwj commented at 9:55 AM on May 4, 2012: memberYes, it's ok now
laanwj referenced this in commit 46692fc929 on May 6, 2012laanwj merged this on May 6, 2012laanwj closed this on May 6, 2012coblee referenced this in commit 5c99317a71 on Jul 17, 2012suprnurd referenced this in commit 0e28de7e10 on Dec 5, 2017lateminer referenced this in commit 2ed4edcfc1 on Jan 22, 2019lateminer referenced this in commit 129c4744ea on Dec 25, 2019DrahtBot locked this on Sep 8, 2021
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
More mirrored repositories can be found on mirror.b10c.me