Bitcoin ABC  0.22.13
P2P Digital Currency
Classes | Functions | Variables
scriptcache.cpp File Reference
#include <script/scriptcache.h>
#include <crypto/sha256.h>
#include <cuckoocache.h>
#include <primitives/transaction.h>
#include <random.h>
#include <script/sigcache.h>
#include <sync.h>
#include <util/system.h>
#include <validation.h>
Include dependency graph for scriptcache.cpp:

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

void InitScriptExecutionCache ()
 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, ScriptCacheHasherscriptExecutionCache
 
static uint256 scriptExecutionCacheNonce (GetRandHash())
 

Function Documentation

◆ AddKeyInScriptCache()

void AddKeyInScriptCache ( ScriptCacheKey  key,
int  nSigChecks 
)

Add an entry in the cache.

Definition at line 118 of file scriptcache.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitScriptExecutionCache()

void InitScriptExecutionCache ( )

Initializes the script-execution cache.

Definition at line 76 of file scriptcache.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsKeyInScriptCache()

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 107 of file scriptcache.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ scriptExecutionCache

Definition at line 73 of file scriptcache.cpp.

◆ scriptExecutionCacheNonce

uint256 scriptExecutionCacheNonce(GetRandHash())
static