mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker
This commit is contained in:
parent
5c1e798a8e
commit
e790c370b5
13 changed files with 65 additions and 75 deletions
|
|
@ -72,17 +72,17 @@ public:
|
|||
|
||||
}
|
||||
|
||||
bool CachingSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash, int flags) const
|
||||
bool CachingSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
|
||||
{
|
||||
static CSignatureCache signatureCache;
|
||||
|
||||
if (signatureCache.Get(sighash, vchSig, pubkey))
|
||||
return true;
|
||||
|
||||
if (!SignatureChecker::VerifySignature(vchSig, pubkey, sighash, flags))
|
||||
if (!SignatureChecker::VerifySignature(vchSig, pubkey, sighash))
|
||||
return false;
|
||||
|
||||
if (!(flags & SCRIPT_VERIFY_NOCACHE))
|
||||
if (store)
|
||||
signatureCache.Set(sighash, vchSig, pubkey);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue