| 33 | } |
| 34 | |
| 35 | void SignatureCache::ComputeEntry(uint256 &entry, const uint256 &hash, |
| 36 | const std::vector<uint8_t> &vchSig, |
| 37 | const CPubKey &pubkey) const { |
| 38 | CSHA256 hasher = m_salted_hasher; |
| 39 | hasher.Write(hash.begin(), 32) |
| 40 | .Write(pubkey.data(), pubkey.size()) |
| 41 | .Write(vchSig.data(), vchSig.size()) |
| 42 | .Finalize(entry.begin()); |
| 43 | } |
| 44 | |
| 45 | bool SignatureCache::Get(const uint256 &entry, const bool erase) { |
| 46 | std::shared_lock<std::shared_mutex> lock(cs_sigcache); |