diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2020-04-06 19:56:06 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2020-04-06 20:52:04 +0000 |
commit | 7a2ecf16df938dd95d3130a46082def7a02338eb (patch) | |
tree | 92d518020759e6b33ab7cad4b82282dd43ebf91e | |
parent | 2952c46b923042f2de801f319e03ed5c4c4eb735 (diff) |
Wallet: Change IsMine check in CWallet::DelAddressBook from assert to failure
-rw-r--r-- | src/wallet/wallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 724691a506..45f5542cad 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3221,7 +3221,10 @@ bool CWallet::DelAddressBook(const CTxDestination& address) // If we want to delete receiving addresses, we need to take care that DestData "used" (and possibly newer DestData) gets preserved (and the "deleted" address transformed into a change entry instead of actually being deleted) // NOTE: This isn't a problem for sending addresses because they never have any DestData yet! // When adding new DestData, it should be considered here whether to retain or delete it (or move it?). - assert(!IsMine(address)); + if (IsMine(address)) { + WalletLogPrintf("%s called with IsMine address, NOT SUPPORTED. Please report this bug! %s\n", __func__, PACKAGE_BUGREPORT); + return false; + } { LOCK(cs_wallet); |