From d1c3741ccd15398f6176a14a25807611cfdc9cc6 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:19:04 +0100 Subject: [PATCH] fix more warnings --- silkworm/node/stagedsync/execution_engine.cpp | 3 +-- silkworm/node/stagedsync/forks/main_chain.cpp | 4 ++-- silkworm/node/stagedsync/server.cpp | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/silkworm/node/stagedsync/execution_engine.cpp b/silkworm/node/stagedsync/execution_engine.cpp index a8752c2153..609234ebd9 100644 --- a/silkworm/node/stagedsync/execution_engine.cpp +++ b/silkworm/node/stagedsync/execution_engine.cpp @@ -20,7 +20,6 @@ #include #include -#include namespace silkworm::stagedsync { @@ -29,7 +28,7 @@ using namespace boost::asio; ExecutionEngine::ExecutionEngine(asio::io_context& ctx, NodeSettings& ns, db::RWAccess dba) : io_context_{ctx}, node_settings_{ns}, - main_chain_(ctx, ns, dba), + main_chain_{ctx, ns, std::move(dba)}, block_cache_{kDefaultCacheSize} {} void ExecutionEngine::open() { // needed to circumvent mdbx threading model limitations diff --git a/silkworm/node/stagedsync/forks/main_chain.cpp b/silkworm/node/stagedsync/forks/main_chain.cpp index 7f6ddb3c3a..0c555b7f59 100644 --- a/silkworm/node/stagedsync/forks/main_chain.cpp +++ b/silkworm/node/stagedsync/forks/main_chain.cpp @@ -32,10 +32,10 @@ namespace silkworm::stagedsync { //! The number of inserted blocks between two successive commits on db constexpr uint64_t kInsertedBlockBatch{1'000}; -MainChain::MainChain(boost::asio::io_context& ctx, NodeSettings& ns, const db::RWAccess dba) +MainChain::MainChain(boost::asio::io_context& ctx, NodeSettings& ns, db::RWAccess dba) : io_context_{ctx}, node_settings_{ns}, - db_access_{dba}, + db_access_{std::move(dba)}, tx_{db_access_.start_rw_tx()}, data_model_{tx_}, pipeline_{&ns}, diff --git a/silkworm/node/stagedsync/server.cpp b/silkworm/node/stagedsync/server.cpp index 6e9cafd3d1..6254066f32 100644 --- a/silkworm/node/stagedsync/server.cpp +++ b/silkworm/node/stagedsync/server.cpp @@ -25,8 +25,7 @@ namespace silkworm::execution { using namespace std::chrono; namespace asio = boost::asio; -Server::Server(NodeSettings& ns, db::RWAccess dba) : exec_engine_{io_context_, ns, dba} { -} +Server::Server(NodeSettings& ns, db::RWAccess dba) : exec_engine_{io_context_, ns, std::move(dba)} {} bool Server::stop() { io_context_.stop();