From f1136200a67fc1df894d45fba51b40f748e0b889 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 8 Sep 2012 17:33:10 +0200 Subject: Move VerifySignature to main --- src/script.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/script.h') diff --git a/src/script.h b/src/script.h index 7b0643f70..f7cf7e8e9 100644 --- a/src/script.h +++ b/src/script.h @@ -673,9 +673,7 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector& addressRet, int& nRequiredRet); bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL); bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL); -bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, - unsigned int flags, int nHashType); -bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType); +bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType); // Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders, // combine them intelligently and return the result. -- cgit v1.2.3 From ef0f422519de4a3ce47d923e5f8f90cd12349f3e Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 8 Dec 2012 22:49:04 +0100 Subject: Remove contention on signature cache during block validation Since block validation happens in parallel, multiple threads may be accessing the signature cache simultaneously. To prevent contention: * Turn the signature cache lock into a shared mutex * Make reading from the cache only acquire a shared lock * Let block validations not store their results in the cache --- src/script.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/script.h') diff --git a/src/script.h b/src/script.h index f7cf7e8e9..ae316b33c 100644 --- a/src/script.h +++ b/src/script.h @@ -32,6 +32,7 @@ enum SCRIPT_VERIFY_NONE = 0, SCRIPT_VERIFY_P2SH = (1U << 0), SCRIPT_VERIFY_STRICTENC = (1U << 1), + SCRIPT_VERIFY_NOCACHE = (1U << 2), }; enum txnouttype -- cgit v1.2.3