Bitcoin ABC 0.30.5
P2P Digital Currency
|
#include <script/scriptcache.h>
#include <common/system.h>
#include <crypto/sha256.h>
#include <cuckoocache.h>
#include <primitives/transaction.h>
#include <random.h>
#include <script/sigcache.h>
#include <sync.h>
#include <validation.h>
Go to the source code of this file.
Classes | |
struct | ScriptCacheElement |
In future if many more values are added, it should be considered to expand the element size to 64 bytes (with padding the spare space as needed) so the key can be long. More... | |
class | ScriptCacheHasher |
Functions | |
bool | InitScriptExecutionCache (size_t max_size_bytes) |
Initializes the script-execution cache. More... | |
bool | IsKeyInScriptCache (ScriptCacheKey key, bool erase, int &nSigChecksOut) |
Check if a given key is in the cache, and if so, return its values. More... | |
void | AddKeyInScriptCache (ScriptCacheKey key, int nSigChecks) |
Add an entry in the cache. More... | |
Variables | |
static CuckooCache::cache< ScriptCacheElement, ScriptCacheHasher > | g_scriptExecutionCache |
static CSHA256 | g_scriptExecutionCacheHasher |
void AddKeyInScriptCache | ( | ScriptCacheKey | key, |
int | nSigChecks | ||
) |
Add an entry in the cache.
Definition at line 119 of file scriptcache.cpp.
bool InitScriptExecutionCache | ( | size_t | max_size_bytes | ) |
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 108 of file scriptcache.cpp.
|
static |
Definition at line 73 of file scriptcache.cpp.
|
static |
Definition at line 74 of file scriptcache.cpp.