diff options
| author | Pieter Wuille <[email protected]> | 2016-06-08 18:05:01 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-06-08 18:32:34 +0200 |
| commit | 4286f43025149cf44207c3ad98e4a1f068520ada (patch) | |
| tree | c2f41222409f2ab55c167a62ffd9ce325dde31b5 /src/coins.cpp | |
| parent | Merge #8083: Add support for dnsseeds with option to filter by servicebits (diff) | |
| parent | test: Add more test vectors for siphash (diff) | |
| download | discoin-4286f43025149cf44207c3ad98e4a1f068520ada.tar.xz discoin-4286f43025149cf44207c3ad98e4a1f068520ada.zip | |
Merge #8173: Use SipHash for node eviction (cont'd)
eebc232 test: Add more test vectors for siphash (Wladimir J. van der Laan)
8884830 Use C++11 thread-safe static initializers (Pieter Wuille)
c31b24f Use 64-bit SipHash of netgroups in eviction (Pieter Wuille)
9bf156b Support SipHash with arbitrary byte writes (Pieter Wuille)
053930f Avoid recalculating vchKeyedNetGroup in eviction logic. (Patrick Strateman)
Diffstat (limited to 'src/coins.cpp')
| -rw-r--r-- | src/coins.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/coins.cpp b/src/coins.cpp index b7dd293d6..39db7dedf 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -56,11 +56,7 @@ void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; } bool CCoinsViewBacked::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); } CCoinsViewCursor *CCoinsViewBacked::Cursor() const { return base->Cursor(); } -SaltedTxidHasher::SaltedTxidHasher() -{ - GetRandBytes((unsigned char*)&k0, sizeof(k0)); - GetRandBytes((unsigned char*)&k1, sizeof(k1)); -} +SaltedTxidHasher::SaltedTxidHasher() : k0(GetRand(std::numeric_limits<uint64_t>::max())), k1(GetRand(std::numeric_limits<uint64_t>::max())) {} CCoinsViewCache::CCoinsViewCache(CCoinsView *baseIn) : CCoinsViewBacked(baseIn), hasModifier(false), cachedCoinsUsage(0) { } |