File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,7 @@ void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; }
5656bool CCoinsViewBacked::BatchWrite (CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite (mapCoins, hashBlock); }
5757CCoinsViewCursor *CCoinsViewBacked::Cursor () const { return base->Cursor (); }
5858
59- SaltedTxidHasher::SaltedTxidHasher ()
60- {
61- GetRandBytes ((unsigned char *)&k0, sizeof (k0));
62- GetRandBytes ((unsigned char *)&k1, sizeof (k1));
63- }
59+ SaltedTxidHasher::SaltedTxidHasher () : k0(GetRand(std::numeric_limits<uint64_t >::max())), k1(GetRand(std::numeric_limits<uint64_t >::max())) {}
6460
6561CCoinsViewCache::CCoinsViewCache (CCoinsView *baseIn) : CCoinsViewBacked(baseIn), hasModifier(false ), cachedCoinsUsage(0 ) { }
6662
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ class SaltedTxidHasher
269269{
270270private:
271271 /* * Salt */
272- uint64_t k0, k1;
272+ const uint64_t k0, k1;
273273
274274public:
275275 SaltedTxidHasher ();
You can’t perform that action at this time.
0 commit comments