From 671949a73c942593a3cf8318bf67fdb76ac91530 Mon Sep 17 00:00:00 2001 From: Liwen Fan Date: Thu, 15 Apr 2021 12:26:18 +0800 Subject: [PATCH 1/2] boost strand::get_io_service deprecated https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/io_context__strand/get_io_service.html --- libethcore/Farm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethcore/Farm.cpp b/libethcore/Farm.cpp index 92478cf64..047013304 100644 --- a/libethcore/Farm.cpp +++ b/libethcore/Farm.cpp @@ -382,7 +382,7 @@ void Farm::restart() */ void Farm::restart_async() { - m_io_strand.get_io_service().post(m_io_strand.wrap(boost::bind(&Farm::restart, this))); + m_io_strand.context().post(m_io_strand.wrap(boost::bind(&Farm::restart, this))); } /** From 6f85e225748029ab8888fec090305f2a7405f046 Mon Sep 17 00:00:00 2001 From: Liwen Fan Date: Thu, 15 Apr 2021 13:59:59 +0800 Subject: [PATCH 2/2] use full qualifier boost::placeholders::_1 --- libpoolprotocols/getwork/EthGetworkClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpoolprotocols/getwork/EthGetworkClient.cpp b/libpoolprotocols/getwork/EthGetworkClient.cpp index 227f7b98e..48d73a07f 100644 --- a/libpoolprotocols/getwork/EthGetworkClient.cpp +++ b/libpoolprotocols/getwork/EthGetworkClient.cpp @@ -103,7 +103,7 @@ void EthGetworkClient::begin_connect() // Eventually endpoints get discarded on connection errors m_endpoint = m_endpoints.front(); m_socket.async_connect( - m_endpoint, m_io_strand.wrap(boost::bind(&EthGetworkClient::handle_connect, this, _1))); + m_endpoint, m_io_strand.wrap(boost::bind(&EthGetworkClient::handle_connect, this, boost::placeholders::_1))); } else {