Skip to content

Commit 7a2ecf1

Browse files
committed
Wallet: Change IsMine check in CWallet::DelAddressBook from assert to failure
1 parent 2952c46 commit 7a2ecf1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3221,7 +3221,10 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
32213221
// 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)
32223222
// NOTE: This isn't a problem for sending addresses because they never have any DestData yet!
32233223
// When adding new DestData, it should be considered here whether to retain or delete it (or move it?).
3224-
assert(!IsMine(address));
3224+
if (IsMine(address)) {
3225+
WalletLogPrintf("%s called with IsMine address, NOT SUPPORTED. Please report this bug! %s\n", __func__, PACKAGE_BUGREPORT);
3226+
return false;
3227+
}
32253228

32263229
{
32273230
LOCK(cs_wallet);

0 commit comments

Comments
 (0)