Moving election enums to the election header.
This commit is contained in:
parent
841dbb5b42
commit
b60233a1fd
2 changed files with 21 additions and 23 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <nano/lib/numbers.hpp>
|
||||
#include <nano/node/election.hpp>
|
||||
#include <nano/node/gap_cache.hpp>
|
||||
#include <nano/node/repcrawler.hpp>
|
||||
#include <nano/node/transport/transport.hpp>
|
||||
|
@ -42,28 +43,6 @@ public:
|
|||
std::shared_ptr<nano::election> election;
|
||||
};
|
||||
|
||||
enum class election_status_type : uint8_t
|
||||
{
|
||||
ongoing = 0,
|
||||
active_confirmed_quorum = 1,
|
||||
active_confirmation_height = 2,
|
||||
inactive_confirmation_height = 3,
|
||||
stopped = 5
|
||||
};
|
||||
|
||||
class election_status final
|
||||
{
|
||||
public:
|
||||
std::shared_ptr<nano::block> winner;
|
||||
nano::amount tally;
|
||||
std::chrono::milliseconds election_end;
|
||||
std::chrono::milliseconds election_duration;
|
||||
unsigned confirmation_request_count;
|
||||
unsigned block_count;
|
||||
unsigned voter_count;
|
||||
election_status_type type;
|
||||
};
|
||||
|
||||
class cementable_account final
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <nano/node/active_transactions.hpp>
|
||||
#include <nano/secure/blockstore.hpp>
|
||||
#include <nano/secure/common.hpp>
|
||||
#include <nano/secure/ledger.hpp>
|
||||
|
@ -14,6 +13,26 @@ namespace nano
|
|||
{
|
||||
class channel;
|
||||
class node;
|
||||
enum class election_status_type : uint8_t
|
||||
{
|
||||
ongoing = 0,
|
||||
active_confirmed_quorum = 1,
|
||||
active_confirmation_height = 2,
|
||||
inactive_confirmation_height = 3,
|
||||
stopped = 5
|
||||
};
|
||||
class election_status final
|
||||
{
|
||||
public:
|
||||
std::shared_ptr<nano::block> winner;
|
||||
nano::amount tally;
|
||||
std::chrono::milliseconds election_end;
|
||||
std::chrono::milliseconds election_duration;
|
||||
unsigned confirmation_request_count;
|
||||
unsigned block_count;
|
||||
unsigned voter_count;
|
||||
election_status_type type;
|
||||
};
|
||||
class vote_info final
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue