mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
Fix maybe-uninitialized warning in IsSpentKey
This commit is contained in:
parent
bc87ad9854
commit
17707db939
1 changed files with 14 additions and 15 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue