mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-23 15:22:46 +02:00
fuzz: make FuzzedSock::Wait() sometimes simulate an occurred event
This commit is contained in:
parent
0c90ff1429
commit
9668e43d8e
@ -18,7 +18,9 @@ bool FuzzedSock::Wait(std::chrono::milliseconds timeout, Event requested, Event*
|
||||
SetFuzzedErrNo(m_fuzzed_data_provider, wait_errnos);
|
||||
return false;
|
||||
}
|
||||
if (occurred) *occurred = 0;
|
||||
if (occurred != nullptr) {
|
||||
*occurred = m_fuzzed_data_provider.ConsumeBool() ? requested : 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user