mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
[addrman] Add deterministic argument to CAddrMan ctor
Removes the need for tests to update nKey and insecure_rand after constructing a CAddrMan.
This commit is contained in:
@@ -29,7 +29,8 @@ public:
|
||||
FuzzedDataProvider& m_fuzzed_data_provider;
|
||||
|
||||
explicit CAddrManDeterministic(FuzzedDataProvider& fuzzed_data_provider)
|
||||
: m_fuzzed_data_provider(fuzzed_data_provider)
|
||||
: CAddrMan(/* deterministic */ true)
|
||||
, m_fuzzed_data_provider(fuzzed_data_provider)
|
||||
{
|
||||
WITH_LOCK(cs, insecure_rand = FastRandomContext{ConsumeUInt256(fuzzed_data_provider)});
|
||||
if (fuzzed_data_provider.ConsumeBool()) {
|
||||
|
||||
Reference in New Issue
Block a user