Bitcoin
Public Member Functions | Private Types | Private Attributes | List of all members
anonymous_namespace{sigcache.cpp}::CSignatureCache Class Reference

Public Member Functions

 CSignatureCache ()
 
void ComputeEntry (uint256 &entry, const uint256 &hash, const std::vector< unsigned char > &vchSig, const CPubKey &pubkey)
 
bool Get (const uint256 &entry, const bool erase)
 
void Set (uint256 &entry)
 
uint32_t setup_bytes (size_t n)
 

Private Types

typedef CuckooCache::cache< uint256, SignatureCacheHashermap_type
 

Private Attributes

uint256 nonce
 Entries are SHA256(nonce || signature hash || public key || signature): More...
 
map_type setValid
 
boost::shared_mutex cs_sigcache
 

Detailed Description

Valid signature cache, to avoid doing expensive ECDSA signature checking twice for every transaction (once when accepted into memory pool, and again when accepted into the block chain)

Member Typedef Documentation

◆ map_type

typedef CuckooCache::cache<uint256, SignatureCacheHasher> anonymous_namespace{sigcache.cpp}::CSignatureCache::map_type
private

Constructor & Destructor Documentation

◆ CSignatureCache()

anonymous_namespace{sigcache.cpp}::CSignatureCache::CSignatureCache ( )
inline

Member Function Documentation

◆ ComputeEntry()

void anonymous_namespace{sigcache.cpp}::CSignatureCache::ComputeEntry ( uint256 entry,
const uint256 hash,
const std::vector< unsigned char > &  vchSig,
const CPubKey pubkey 
)
inline

◆ Get()

bool anonymous_namespace{sigcache.cpp}::CSignatureCache::Get ( const uint256 entry,
const bool  erase 
)
inline

◆ Set()

void anonymous_namespace{sigcache.cpp}::CSignatureCache::Set ( uint256 entry)
inline

◆ setup_bytes()

uint32_t anonymous_namespace{sigcache.cpp}::CSignatureCache::setup_bytes ( size_t  n)
inline

Member Data Documentation

◆ cs_sigcache

boost::shared_mutex anonymous_namespace{sigcache.cpp}::CSignatureCache::cs_sigcache
private

◆ nonce

uint256 anonymous_namespace{sigcache.cpp}::CSignatureCache::nonce
private

Entries are SHA256(nonce || signature hash || public key || signature):

◆ setValid

map_type anonymous_namespace{sigcache.cpp}::CSignatureCache::setValid
private

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