![]() |
Bitcoin ABC 0.32.4
P2P Digital Currency
|
Data structure to cache SHA256 midstates for the ECDSA sighash calculations (bare, P2SH) More...
#include <interpreter.h>
Public Member Functions | |
| bool | Load (const SigHashType &hash_type, const CScript &script_code, HashWriter &writer) const noexcept |
| Load into writer the SHA256 midstate if found in this cache. More... | |
| void | Store (const SigHashType &hash_type, const CScript &script_code, const HashWriter &writer) noexcept |
| Store into this cache object the provided SHA256 midstate. More... | |
Private Member Functions | |
| int | CacheIndex (const SigHashType &hash_type) const noexcept |
| Given a hash_type, find which of the 12 cache entries is to be used. More... | |
Private Attributes | |
| std::optional< std::pair< CScript, HashWriter > > | m_cache_entries [12] |
| For each sighash mode: [0] ALL [1] NONE [2] SINGLE [3] ALL|ANYONE [4] NONE|ANYONE [5] SINGLE|ANYONE [6] ALL|FORKID [7] NONE|FORKID [8] SINGLE|FORKID [9] ALL|ANYONE|FORKID [10] NONE|ANYONE|FORKID [11] SINGLE|ANYONE|FORKID optionally store a scriptCode which the hash is for, plus a midstate for the SHA256 computation just before adding the hash_type itself. More... | |
Data structure to cache SHA256 midstates for the ECDSA sighash calculations (bare, P2SH)
Definition at line 33 of file interpreter.h.
|
privatenoexcept |
Given a hash_type, find which of the 12 cache entries is to be used.
Definition at line 1535 of file interpreter.cpp.
|
noexcept |
Load into writer the SHA256 midstate if found in this cache.
Definition at line 1541 of file interpreter.cpp.
|
noexcept |
Store into this cache object the provided SHA256 midstate.
Definition at line 1552 of file interpreter.cpp.
|
private |
For each sighash mode: [0] ALL [1] NONE [2] SINGLE [3] ALL|ANYONE [4] NONE|ANYONE [5] SINGLE|ANYONE [6] ALL|FORKID [7] NONE|FORKID [8] SINGLE|FORKID [9] ALL|ANYONE|FORKID [10] NONE|ANYONE|FORKID [11] SINGLE|ANYONE|FORKID optionally store a scriptCode which the hash is for, plus a midstate for the SHA256 computation just before adding the hash_type itself.
Definition at line 51 of file interpreter.h.