mirror of
https://github.com/monero-project/monero.git
synced 2025-08-15 20:30:20 -04:00
Fix build with boost ASIO 0.87. Support boost 1.66+
This commit is contained in:
parent
23a11d851a
commit
01bcd52924
37 changed files with 400 additions and 494 deletions
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
@ -375,9 +376,9 @@ bool Blockchain::init(BlockchainDB* db, const network_type nettype, bool offline
|
|||
|
||||
// create general purpose async service queue
|
||||
|
||||
m_async_work_idle = std::unique_ptr < boost::asio::io_service::work > (new boost::asio::io_service::work(m_async_service));
|
||||
m_async_work_idle = std::make_unique<boost::asio::executor_work_guard<boost::asio::io_context::executor_type>>(m_async_service.get_executor());
|
||||
// we only need 1
|
||||
m_async_pool.create_thread(boost::bind(&boost::asio::io_service::run, &m_async_service));
|
||||
m_async_pool.create_thread(boost::bind(&boost::asio::io_context::run, &m_async_service));
|
||||
|
||||
#if defined(PER_BLOCK_CHECKPOINT)
|
||||
if (m_nettype != FAKECHAIN)
|
||||
|
@ -4760,7 +4761,7 @@ bool Blockchain::cleanup_handle_incoming_blocks(bool force_sync)
|
|||
{
|
||||
m_sync_counter = 0;
|
||||
m_bytes_to_sync = 0;
|
||||
m_async_service.dispatch(boost::bind(&Blockchain::store_blockchain, this));
|
||||
boost::asio::dispatch(m_async_service, boost::bind(&Blockchain::store_blockchain, this));
|
||||
}
|
||||
else if(m_db_sync_mode == db_sync)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue