Fix maybe-uninitialized warning in IsSpentKey
This commit is contained in:
1 parent
bc87ad9854
commit
17707db939
1 file changed
+2
-3
@@ -1039,9 +1039,7 @@ bool CWallet::IsSpentKey(const CScript& scriptPubKey) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LegacyScriptPubKeyMan* spk_man = GetLegacyScriptPubKeyMan();
|
if (LegacyScriptPubKeyMan* spk_man = GetLegacyScriptPubKeyMan()) {
|
||||||
if (!spk_man) return false;
|
|
||||||
|
|
||||||
for (const auto& keyid : GetAffectedKeys(scriptPubKey, *spk_man)) {
|
for (const auto& keyid : GetAffectedKeys(scriptPubKey, *spk_man)) {
|
||||||
WitnessV0KeyHash wpkh_dest(keyid);
|
WitnessV0KeyHash wpkh_dest(keyid);
|
||||||
if (IsAddressPreviouslySpent(wpkh_dest)) {
|
if (IsAddressPreviouslySpent(wpkh_dest)) {
|
||||||
@@ -1056,6 +1054,7 @@ bool CWallet::IsSpentKey(const CScript& scriptPubKey) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user