aboutsummaryrefslogtreecommitdiff
path: root/tests/fuzz/levin.cpp
diff options
context:
space:
mode:
authorLee *!* Clagett <code@leeclagett.com>2024-12-17 16:40:15 -0500
committerLee *!* Clagett <code@leeclagett.com>2025-02-14 13:29:57 -0500
commit01bcd52924244ec8d2a24c10fcef8959289d09ff (patch)
tree7aa82581901a978c3c7ba3b0f50ac8c84f753945 /tests/fuzz/levin.cpp
parent23a11d851adef30aea1888da0a7dd23936c81ec1 (diff)
downloadmonzero-core-01bcd52924244ec8d2a24c10fcef8959289d09ff.tar.gz
monzero-core-01bcd52924244ec8d2a24c10fcef8959289d09ff.tar.xz
monzero-core-01bcd52924244ec8d2a24c10fcef8959289d09ff.zip
Fix build with boost ASIO 0.87. Support boost 1.66+
Diffstat (limited to 'tests/fuzz/levin.cpp')
-rw-r--r--tests/fuzz/levin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/fuzz/levin.cpp b/tests/fuzz/levin.cpp
index d86f6b940..4c30980e9 100644
--- a/tests/fuzz/levin.cpp
+++ b/tests/fuzz/levin.cpp
@@ -138,7 +138,7 @@ namespace
class test_connection : public epee::net_utils::i_service_endpoint
{
public:
- test_connection(boost::asio::io_service& io_service, test_levin_protocol_handler_config& protocol_config)
+ test_connection(boost::asio::io_context& io_service, test_levin_protocol_handler_config& protocol_config)
: m_io_service(io_service)
, m_protocol_handler(this, protocol_config, m_context)
, m_send_return(true)
@@ -163,7 +163,7 @@ namespace
virtual bool send_done() { return true; }
virtual bool call_run_once_service_io() { return true; }
virtual bool request_callback() { return true; }
- virtual boost::asio::io_service& get_io_service() { return m_io_service; }
+ virtual boost::asio::io_context& get_io_context() { return m_io_service; }
virtual bool add_ref() { return true; }
virtual bool release() { return true; }
@@ -180,7 +180,7 @@ namespace
test_levin_protocol_handler m_protocol_handler;
private:
- boost::asio::io_service& m_io_service;
+ boost::asio::io_context& m_io_service;
call_counter m_send_counter;
boost::mutex m_mutex;
@@ -224,7 +224,7 @@ namespace
}
protected:
- boost::asio::io_service m_io_service;
+ boost::asio::io_context m_io_service;
test_levin_protocol_handler_config m_handler_config;
test_levin_commands_handler *m_pcommands_handler, &m_commands_handler;
};
@@ -300,7 +300,7 @@ BEGIN_SIMPLE_FUZZER()
fclose(f);
#endif
//std::unique_ptr<test_connection> conn = new test();
- boost::asio::io_service io_service;
+ boost::asio::io_context io_service;
test_levin_protocol_handler_config m_handler_config;
test_levin_commands_handler *m_pcommands_handler = new test_levin_commands_handler();
m_handler_config.set_handler(m_pcommands_handler, [](epee::levin::levin_commands_handler<test_levin_connection_context> *handler) { delete handler; });