Skip to content

Commit 89bd978

Browse files
committed
wallet: use address book IsChange in ScriptIsChange
1 parent fa3fed0 commit 89bd978

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wallet/receive.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ bool ScriptIsChange(const CWallet& wallet, const CScript& script)
6262
if (wallet.IsMine(script))
6363
{
6464
CTxDestination address;
65-
if (!ExtractDestination(script, address))
66-
return true;
67-
if (!wallet.FindAddressBookEntry(address)) {
65+
if (!ExtractDestination(script, address)) return false;
66+
auto entry = wallet.FindAddressBookEntry(address);
67+
if (!entry || entry->IsChange()) {
6868
return true;
6969
}
7070
}

0 commit comments

Comments
 (0)