![]() |
Bitcoin ABC 0.32.4
P2P Digital Currency
|
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) More...
#include <sigcache.h>
Public Member Functions | |
| SignatureCache (size_t max_size_bytes) | |
| SignatureCache (const SignatureCache &)=delete | |
| SignatureCache & | operator= (const SignatureCache &)=delete |
| void | ComputeEntry (uint256 &entry, const uint256 &hash, const std::vector< uint8_t > &vchSig, const CPubKey &pubkey) const |
| bool | Get (const uint256 &entry, const bool erase) |
| void | Set (const uint256 &entry) |
Private Types | |
| typedef CuckooCache::cache< CuckooCache::KeyOnly< uint256 >, SignatureCacheHasher > | map_type |
Private Attributes | |
| CSHA256 | m_salted_hasher |
| Entries are SHA256(nonce || signature hash || public key || signature): More... | |
| map_type | setValid |
| std::shared_mutex | cs_sigcache |
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)
Definition at line 33 of file sigcache.h.
|
private |
Definition at line 39 of file sigcache.h.
| SignatureCache::SignatureCache | ( | size_t | max_size_bytes | ) |
|
delete |
| void SignatureCache::ComputeEntry | ( | uint256 & | entry, |
| const uint256 & | hash, | ||
| const std::vector< uint8_t > & | vchSig, | ||
| const CPubKey & | pubkey | ||
| ) | const |
Definition at line 35 of file sigcache.cpp.
| bool SignatureCache::Get | ( | const uint256 & | entry, |
| const bool | erase | ||
| ) |
Definition at line 45 of file sigcache.cpp.
|
delete |
| void SignatureCache::Set | ( | const uint256 & | entry | ) |
Definition at line 50 of file sigcache.cpp.
|
private |
Definition at line 41 of file sigcache.h.
|
private |
Entries are SHA256(nonce || signature hash || public key || signature):
Definition at line 36 of file sigcache.h.
|
private |
Definition at line 40 of file sigcache.h.