| 2838 | } |
| 2839 | |
| 2840 | bool SigHashCache::Load(int32_t hash_type, const CScript& script_code, CHashWriter& writer) const noexcept |
| 2841 | { |
| 2842 | auto& entry = m_cache_entries[CacheIndex(hash_type)]; |
| 2843 | if (entry.has_value()) { |
| 2844 | if (script_code == entry->first) { |
| 2845 | writer.~CHashWriter(); |
| 2846 | new (&writer) CHashWriter(entry->second); |
| 2847 | return true; |
| 2848 | } |
| 2849 | } |
| 2850 | return false; |
| 2851 | } |
| 2852 | |
| 2853 | void SigHashCache::Store(int32_t hash_type, const CScript& script_code, const CHashWriter& writer) noexcept |
| 2854 | { |
no outgoing calls
no test coverage detected