![]() |
Bitcoin ABC
0.26.3
P2P Digital Currency
|
Go to the source code of this file.
Classes | |
class | ScriptCacheKey |
The script cache is a map using a key/value element, that caches the success of executing a specific transaction's input scripts under a specific set of flags, along with any associated information learned during execution. More... | |
Functions | |
void | InitScriptExecutionCache () |
Initializes the script-execution cache. More... | |
bool | IsKeyInScriptCache (ScriptCacheKey key, bool erase, int &nSigChecksOut) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
Check if a given key is in the cache, and if so, return its values. More... | |
void | AddKeyInScriptCache (ScriptCacheKey key, int nSigChecks) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
Add an entry in the cache. More... | |
Variables | |
RecursiveMutex | cs_main |
Global state. More... | |
static const unsigned int | DEFAULT_MAX_SCRIPT_CACHE_SIZE = 32 |
static const int64_t | MAX_MAX_SCRIPT_CACHE_SIZE = 16384 |
void AddKeyInScriptCache | ( | ScriptCacheKey | key, |
int | nSigChecks | ||
) |
Add an entry in the cache.
Definition at line 120 of file scriptcache.cpp.
void InitScriptExecutionCache | ( | ) |
Initializes the script-execution cache.
Definition at line 76 of file scriptcache.cpp.
bool IsKeyInScriptCache | ( | ScriptCacheKey | key, |
bool | erase, | ||
int & | nSigChecksOut | ||
) |
Check if a given key is in the cache, and if so, return its values.
(if not found, nSigChecks may or may not be set to an arbitrary value)
Definition at line 109 of file scriptcache.cpp.
|
extern |
Global state.
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
This may also need to be locked when updating the transaction pool, e.g. on AcceptToMemoryPool. See CTxMemPool::cs comment for details.
The transaction pool has a separate lock to allow reading from it and the chainstate at the same time.
Definition at line 113 of file validation.cpp.
|
static |
Definition at line 48 of file scriptcache.h.
|
static |
Definition at line 50 of file scriptcache.h.