Skip to content

Commit e2c45d8

Browse files
instagibbspromag
authored andcommitted
IsUsedDestination shouldn't use key id as script id for ScriptHash
Github-Pull: #17924 Rebased-From: 4b8f1e9
1 parent a5489c9 commit e2c45d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ bool CWallet::IsUsedDestination(const uint256& hash, unsigned int n) const
10871087
if (GetDestData(wpkh_dest, "used", nullptr)) {
10881088
return true;
10891089
}
1090-
ScriptHash sh_wpkh_dest(wpkh_dest);
1090+
ScriptHash sh_wpkh_dest(GetScriptForDestination(wpkh_dest));
10911091
if (GetDestData(sh_wpkh_dest, "used", nullptr)) {
10921092
return true;
10931093
}

0 commit comments

Comments
 (0)