From 85b2f6233c408cf8b393c2df7fcb6b38dfcc434d Mon Sep 17 00:00:00 2001 From: div72 Date: Thu, 19 Dec 2024 16:19:04 +0300 Subject: [PATCH] [wip] diagnose: fix for boost 1.87 --- src/wallet/diagnose.cpp | 2 +- src/wallet/diagnose.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wallet/diagnose.cpp b/src/wallet/diagnose.cpp index 6a5c41102f..2653e534ed 100644 --- a/src/wallet/diagnose.cpp +++ b/src/wallet/diagnose.cpp @@ -15,7 +15,7 @@ bool Diagnose::m_hasPoolProjects = false; bool Diagnose::m_configured_for_investor_mode = false; std::unordered_map Diagnose::m_name_to_test_map; CCriticalSection Diagnose::cs_diagnostictests; -boost::asio::io_service Diagnose::s_ioService; +boost::asio::io_context Diagnose::s_ioService; /** * The function check the time is correct on your PC. It checks the skew in the clock. diff --git a/src/wallet/diagnose.h b/src/wallet/diagnose.h index 606b0205ec..8ffcba4821 100644 --- a/src/wallet/diagnose.h +++ b/src/wallet/diagnose.h @@ -185,7 +185,7 @@ class Diagnose static CCriticalSection cs_diagnostictests; //!< used to protect the critical sections, for multithreading TestNames m_test_name; //!< This must be defined for derived classes. Each derived class must declare the name of the test and add to the TestNames enum static std::unordered_map m_name_to_test_map; //!< a map to save the test and a pointer to it. Some tests are related and need to access the results of each other. - static boost::asio::io_service s_ioService; + static boost::asio::io_context s_ioService; }; /** @@ -381,7 +381,7 @@ class VerifyClock : public Diagnose connectToNTPHost(); - s_ioService.reset(); + s_ioService.restart(); s_ioService.run(); } } @@ -638,7 +638,7 @@ class VerifyTCPPort : public Diagnose private: boost::asio::ip::tcp::socket m_tcpSocket; void handle_connect(const boost::system::error_code& err, - boost::asio::ip::tcp::resolver::iterator endpoint_iterator); + boost::asio::ip::tcp::resolver::results_type::iterator endpoint_iterator); void TCPFinished(); @@ -649,7 +649,7 @@ class VerifyTCPPort : public Diagnose ~VerifyTCPPort() {} void runCheck() { - s_ioService.reset(); + s_ioService.restart(); m_results_string_arg.clear(); m_results_tip_arg.clear(); @@ -671,7 +671,7 @@ class VerifyTCPPort : public Diagnose auto endpoint_iterator = resolver.resolve(query); #endif - if (endpoint_iterator == boost::asio::ip::tcp::resolver::iterator()) { + if (endpoint_iterator == boost::asio::ip::tcp::resolver::results_type::iterator()) { m_tcpSocket.close(); m_results = WARNING; m_results_tip = _("Outbound communication to TCP port %1 appears to be blocked.");