Extracting election_insertion_result class in to its own file so it can be used separate from the entire active_transactions class. (#4174)

This commit is contained in:
clemahieu 2023-03-07 02:58:15 +00:00 committed by GitHub
commit a55f4080a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View file

@ -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

View file

@ -2,6 +2,7 @@
#include <nano/lib/numbers.hpp>
#include <nano/node/election.hpp>
#include <nano/node/election_insertion_result.hpp>
#include <nano/node/voting.hpp>
#include <nano/secure/common.hpp>
@ -97,13 +98,6 @@ public: // Container info
std::unique_ptr<container_info_component> collect_container_info (std::string const &);
};
class election_insertion_result final
{
public:
std::shared_ptr<nano::election> election;
bool inserted{ false };
};
/**
* Core class for determining consensus
* Holds all active blocks i.e. recently added blocks that need confirmation

View file

@ -0,0 +1,14 @@
#pragma once
#include <memory>
namespace nano
{
class election;
class election_insertion_result final
{
public:
std::shared_ptr<nano::election> election;
bool inserted{ false };
};
}