mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge #20674: fuzz: Call SendMessages after ProcessMessage to increase coverage
fa09f97beabafaaeb59fca710760578ff1f2e8d7 fuzz: Call SendMessages after ProcessMessage to increase coverage (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: Tested ACK fa09f97beabafaaeb59fca710760578ff1f2e8d7 dhruv: tACK fa09f97 Crypt-iQ: cr ACK fa09f97beabafaaeb59fca710760578ff1f2e8d7 sipa: utACK fa09f97beabafaaeb59fca710760578ff1f2e8d7 Tree-SHA512: 87c52aa38f902c4f6c9c2380f486a3ab21edc0e21e48bb619cdb67cfd698154cc57b170eef31fc940c0bb2c878e155847de03fc6e4cd85bed25f10c4f80c747b
This commit is contained in:
parent
058df132c4
commit
6c660cf29a
@ -73,6 +73,10 @@ void fuzz_target(const std::vector<uint8_t>& buffer, const std::string& LIMIT_TO
|
|||||||
g_setup->m_node.peer_logic->ProcessMessage(p2p_node, random_message_type, random_bytes_data_stream, GetTimeMillis(), Params(), std::atomic<bool>{false});
|
g_setup->m_node.peer_logic->ProcessMessage(p2p_node, random_message_type, random_bytes_data_stream, GetTimeMillis(), Params(), std::atomic<bool>{false});
|
||||||
} catch (const std::ios_base::failure& e) {
|
} catch (const std::ios_base::failure& e) {
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
LOCK(p2p_node.cs_sendProcessing);
|
||||||
|
g_setup->m_node.peer_logic->SendMessages(&p2p_node);
|
||||||
|
}
|
||||||
SyncWithValidationInterfaceQueue();
|
SyncWithValidationInterfaceQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,10 @@ FUZZ_TARGET_INIT(process_messages, initialize_process_messages)
|
|||||||
connman.ProcessMessagesOnce(random_node);
|
connman.ProcessMessagesOnce(random_node);
|
||||||
} catch (const std::ios_base::failure&) {
|
} catch (const std::ios_base::failure&) {
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
LOCK(random_node.cs_sendProcessing);
|
||||||
|
g_setup->m_node.peer_logic->SendMessages(&random_node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
connman.ClearTestNodes();
|
connman.ClearTestNodes();
|
||||||
SyncWithValidationInterfaceQueue();
|
SyncWithValidationInterfaceQueue();
|
||||||
|
Loading…
Reference in New Issue
Block a user