Check if scan secret is null before using it in LegacyScriptPubKeyMan::IsMine

pull/816/head
David Burkett 3 years ago committed by Loshan T
parent 0c91f78dde
commit bdb21d32fe

@ -235,6 +235,10 @@ IsMineResult IsMineInner(const LegacyScriptPubKeyMan& keystore, const CScript& s
isminetype LegacyScriptPubKeyMan::IsMine(const DestinationAddr& script) const
{
if (script.IsMWEB()) {
if (GetScanSecret().IsNull()) {
return ISMINE_NO;
}
const StealthAddress& mweb_address = script.GetMWEBAddress();
if (mweb_address.GetSpendPubKey().Mul(GetScanSecret()) != mweb_address.GetScanPubKey()) {
return ISMINE_NO;

Loading…
Cancel
Save