From 4b8f1e989f3b969dc628b0801d5c31ebd373719c Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Tue, 14 Jan 2020 13:23:24 -0500 Subject: [PATCH] IsUsedDestination shouldn't use key id as script id for ScriptHash --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d3968eaea1..cc6eebba97 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -734,7 +734,7 @@ bool CWallet::IsUsedDestination(const uint256& hash, unsigned int n) const if (GetDestData(wpkh_dest, "used", nullptr)) { return true; } - ScriptHash sh_wpkh_dest(wpkh_dest); + ScriptHash sh_wpkh_dest(GetScriptForDestination(wpkh_dest)); if (GetDestData(sh_wpkh_dest, "used", nullptr)) { return true; }