Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.cpp
Show First 20 Lines • Show All 1,466 Lines • ▼ Show 20 Lines | bool BaseSignatureChecker::VerifySignature(const std::vector<uint8_t> &vchSig, | ||||
const CPubKey &pubkey, | const CPubKey &pubkey, | ||||
const uint256 &sighash, | const uint256 &sighash, | ||||
uint32_t flags) const { | uint32_t flags) const { | ||||
/** | /** | ||||
* This function is memoized by sigcache.cpp. If there are dependencies on | * This function is memoized by sigcache.cpp. If there are dependencies on | ||||
* flags, either explicit or implicit, they should be noted in sigcache.cpp | * flags, either explicit or implicit, they should be noted in sigcache.cpp | ||||
* by making sure said flags are omitted from INVARIANT_FLAGS. | * by making sure said flags are omitted from INVARIANT_FLAGS. | ||||
*/ | */ | ||||
if (IsSchnorrSignature(vchSig, flags)) { | |||||
return pubkey.VerifySchnorr(sighash, vchSig); | |||||
} else { | |||||
return pubkey.VerifyECDSA(sighash, vchSig); | return pubkey.VerifyECDSA(sighash, vchSig); | ||||
} | } | ||||
} | |||||
bool TransactionSignatureChecker::CheckSig( | bool TransactionSignatureChecker::CheckSig( | ||||
const std::vector<uint8_t> &vchSigIn, const std::vector<uint8_t> &vchPubKey, | const std::vector<uint8_t> &vchSigIn, const std::vector<uint8_t> &vchPubKey, | ||||
const CScript &scriptCode, uint32_t flags) const { | const CScript &scriptCode, uint32_t flags) const { | ||||
CPubKey pubkey(vchPubKey); | CPubKey pubkey(vchPubKey); | ||||
if (!pubkey.IsValid()) { | if (!pubkey.IsValid()) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |