mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
fuzz: make FuzzedSock::Wait() sometimes simulate an occurred event
This commit is contained in:
parent
0c90ff1429
commit
9668e43d8e
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue