diff options
| author | Pieter Wuille <[email protected]> | 2017-04-13 09:54:05 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-04-13 10:13:13 -0700 |
| commit | b7365f0545b1a6862e3277b2b2139ee0d5aee1cf (patch) | |
| tree | e28b9adb622f0e7ee1ec89d125ed7d7f71b069e7 /src/script/sigcache.cpp | |
| parent | Merge #9665: Use cached [compact] blocks to respond to getdata messages (diff) | |
| parent | Deduplicate SignatureCacheHasher (diff) | |
| download | discoin-b7365f0545b1a6862e3277b2b2139ee0d5aee1cf.tar.xz discoin-b7365f0545b1a6862e3277b2b2139ee0d5aee1cf.zip | |
Merge #9480: De-duplicate SignatureCacheHasher
f9c8807 Deduplicate SignatureCacheHasher (Jeremy Rubin)
Tree-SHA512: 714a0f39d1c836fedd1868369b4ebf1096cd800cc544d57b54101da338c80c627a3e59c6644b3268054efe85053cf1a7be508af935f624491e7acfae61123994
Diffstat (limited to 'src/script/sigcache.cpp')
| -rw-r--r-- | src/script/sigcache.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index 6f47b725f..7bb8d9941 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -15,28 +15,6 @@ #include <boost/thread.hpp> namespace { - -/** - * We're hashing a nonce into the entries themselves, so we don't need extra - * blinding in the set hash computation. - * - * This may exhibit platform endian dependent behavior but because these are - * nonced hashes (random) and this state is only ever used locally it is safe. - * All that matters is local consistency. - */ -class SignatureCacheHasher -{ -public: - template <uint8_t hash_select> - uint32_t operator()(const uint256& key) const - { - static_assert(hash_select <8, "SignatureCacheHasher only has 8 hashes available."); - uint32_t u; - std::memcpy(&u, key.begin()+4*hash_select, 4); - return u; - } -}; - /** * Valid signature cache, to avoid doing expensive ECDSA signature checking * twice for every transaction (once when accepted into memory pool, and |