IsUsedDestination shouldn't use key id as script id for ScriptHash

This commit is contained in:
Gregory Sanders 2020-01-14 13:23:24 -05:00
parent 45f151913e
commit 4b8f1e989f

View File

@ -734,7 +734,7 @@ bool CWallet::IsUsedDestination(const uint256& hash, unsigned int n) const
if (GetDestData(wpkh_dest, "used", nullptr)) { if (GetDestData(wpkh_dest, "used", nullptr)) {
return true; return true;
} }
ScriptHash sh_wpkh_dest(wpkh_dest); ScriptHash sh_wpkh_dest(GetScriptForDestination(wpkh_dest));
if (GetDestData(sh_wpkh_dest, "used", nullptr)) { if (GetDestData(sh_wpkh_dest, "used", nullptr)) {
return true; return true;
} }