Use HandleMissingData also in CheckSchnorrSignature

This commit is contained in:
Pieter Wuille 2021-05-22 20:31:58 -07:00
parent dbb0ce9fbf
commit e77a2839b5

View file

@ -1711,7 +1711,7 @@ bool GenericTransactionSignatureChecker<T>::CheckSchnorrSignature(Span<const uns
if (hashtype == SIGHASH_DEFAULT) return set_error(serror, SCRIPT_ERR_SCHNORR_SIG_HASHTYPE); if (hashtype == SIGHASH_DEFAULT) return set_error(serror, SCRIPT_ERR_SCHNORR_SIG_HASHTYPE);
} }
uint256 sighash; uint256 sighash;
assert(this->txdata); if (!this->txdata) return HandleMissingData(m_mdb);
if (!SignatureHashSchnorr(sighash, execdata, *txTo, nIn, hashtype, sigversion, *this->txdata, m_mdb)) { if (!SignatureHashSchnorr(sighash, execdata, *txTo, nIn, hashtype, sigversion, *this->txdata, m_mdb)) {
return set_error(serror, SCRIPT_ERR_SCHNORR_SIG_HASHTYPE); return set_error(serror, SCRIPT_ERR_SCHNORR_SIG_HASHTYPE);
} }