Bitcoin ABC  0.22.12
P2P Digital Currency
Classes | Functions | Variables
scriptcache.h File Reference
#include <array>
#include <cstdint>
Include dependency graph for scriptcache.h:
This graph shows which files directly or indirectly include this file:

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)
 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 const unsigned int DEFAULT_MAX_SCRIPT_CACHE_SIZE = 32
 
static const int64_t MAX_MAX_SCRIPT_CACHE_SIZE = 16384
 

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

◆ DEFAULT_MAX_SCRIPT_CACHE_SIZE

const unsigned int DEFAULT_MAX_SCRIPT_CACHE_SIZE = 32
static

Definition at line 40 of file scriptcache.h.

◆ MAX_MAX_SCRIPT_CACHE_SIZE

const int64_t MAX_MAX_SCRIPT_CACHE_SIZE = 16384
static

Definition at line 42 of file scriptcache.h.