Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
ScriptCacheElement Struct Reference

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...

Collaboration diagram for ScriptCacheElement:
[legend]

Public Types

using KeyType = ScriptCacheKey
 

Public Member Functions

 ScriptCacheElement ()=default
 
 ScriptCacheElement (const KeyType &keyIn, int nSigChecksIn)
 
const KeyTypegetKey () const
 

Public Attributes

KeyType key
 
int nSigChecks
 

Detailed Description

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.

Shortening the key too much risks opening ourselves up to consensus-failing collisions, however it should be noted that our cache nonce is private and unique, so collisions would affect only one node and attackers have no way of offline-preparing a collision attack even on short keys.

Definition at line 25 of file scriptcache.cpp.

Member Typedef Documentation

◆ KeyType

Definition at line 26 of file scriptcache.cpp.

Constructor & Destructor Documentation

◆ ScriptCacheElement() [1/2]

ScriptCacheElement::ScriptCacheElement ( )
default

◆ ScriptCacheElement() [2/2]

ScriptCacheElement::ScriptCacheElement ( const KeyType keyIn,
int  nSigChecksIn 
)
inline

Definition at line 33 of file scriptcache.cpp.

Member Function Documentation

◆ getKey()

const KeyType & ScriptCacheElement::getKey ( ) const
inline

Definition at line 36 of file scriptcache.cpp.

Member Data Documentation

◆ key

KeyType ScriptCacheElement::key

Definition at line 28 of file scriptcache.cpp.

◆ nSigChecks

int ScriptCacheElement::nSigChecks

Definition at line 29 of file scriptcache.cpp.


The documentation for this struct was generated from the following file: