Make addrman use its local RNG exclusively

This commit is contained in:
Pieter Wuille
2018-10-31 13:56:19 -07:00
parent 6d0a14703e
commit 9695f31d75
3 changed files with 12 additions and 25 deletions

View File

@@ -32,12 +32,6 @@ public:
insecure_rand = FastRandomContext(true);
}
int RandomInt(int nMax) override
{
state = (CHashWriter(SER_GETHASH, 0) << state).GetCheapHash();
return (unsigned int)(state % nMax);
}
CAddrInfo* Find(const CNetAddr& addr, int* pnId = nullptr)
{
LOCK(cs);