From a55f4080a10c7efa7fc8bdb6763fd2bd02a93883 Mon Sep 17 00:00:00 2001 From: clemahieu Date: Tue, 7 Mar 2023 02:58:15 +0000 Subject: [PATCH] Extracting election_insertion_result class in to its own file so it can be used separate from the entire active_transactions class. (#4174) --- nano/node/CMakeLists.txt | 1 + nano/node/active_transactions.hpp | 8 +------- nano/node/election_insertion_result.hpp | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 nano/node/election_insertion_result.hpp diff --git a/nano/node/CMakeLists.txt b/nano/node/CMakeLists.txt index e07c62bac..bf20c1ec3 100644 --- a/nano/node/CMakeLists.txt +++ b/nano/node/CMakeLists.txt @@ -68,6 +68,7 @@ add_library( distributed_work_factory.cpp election.hpp election.cpp + election_insertion_result.hpp election_scheduler.hpp election_scheduler.cpp epoch_upgrader.hpp diff --git a/nano/node/active_transactions.hpp b/nano/node/active_transactions.hpp index cc8b52f9b..aac46143e 100644 --- a/nano/node/active_transactions.hpp +++ b/nano/node/active_transactions.hpp @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -97,13 +98,6 @@ public: // Container info std::unique_ptr collect_container_info (std::string const &); }; -class election_insertion_result final -{ -public: - std::shared_ptr election; - bool inserted{ false }; -}; - /** * Core class for determining consensus * Holds all active blocks i.e. recently added blocks that need confirmation diff --git a/nano/node/election_insertion_result.hpp b/nano/node/election_insertion_result.hpp new file mode 100644 index 000000000..d2f988b75 --- /dev/null +++ b/nano/node/election_insertion_result.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include + +namespace nano +{ +class election; +class election_insertion_result final +{ +public: + std::shared_ptr election; + bool inserted{ false }; +}; +}