#339 - add active_sidechain_type
This commit is contained in:
parent
46b5f08caf
commit
626633c9b6
3 changed files with 12 additions and 8 deletions
|
|
@ -52,13 +52,13 @@ namespace graphene { namespace chain {
|
||||||
uint32_t next_available_vote_id = 0;
|
uint32_t next_available_vote_id = 0;
|
||||||
vector<committee_member_id_type> active_committee_members; // updated once per maintenance interval
|
vector<committee_member_id_type> active_committee_members; // updated once per maintenance interval
|
||||||
flat_set<witness_id_type> active_witnesses; // updated once per maintenance interval
|
flat_set<witness_id_type> active_witnesses; // updated once per maintenance interval
|
||||||
|
|
||||||
//! Fixme - delete sidechain type from here
|
|
||||||
flat_map<sidechain_type, vector<son_info> > active_sons = []() // updated once per maintenance interval
|
flat_map<sidechain_type, vector<son_info> > active_sons = []() // updated once per maintenance interval
|
||||||
{
|
{
|
||||||
flat_map<sidechain_type, vector<son_info> > active_sons;
|
flat_map<sidechain_type, vector<son_info> > active_sons;
|
||||||
active_sons[sidechain_type::bitcoin] = vector<son_info>();
|
for(const auto& active_sidechain_type : active_sidechain_types)
|
||||||
active_sons[sidechain_type::hive] = vector<son_info>();
|
{
|
||||||
|
active_sons[active_sidechain_type] = vector<son_info>();
|
||||||
|
}
|
||||||
return active_sons;
|
return active_sons;
|
||||||
}();
|
}();
|
||||||
// n.b. witness scheduling is done by witness_schedule object
|
// n.b. witness scheduling is done by witness_schedule object
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <set>
|
||||||
#include <fc/reflect/reflect.hpp>
|
#include <fc/reflect/reflect.hpp>
|
||||||
|
|
||||||
namespace graphene { namespace chain {
|
namespace graphene { namespace chain {
|
||||||
|
|
@ -13,6 +14,8 @@ enum class sidechain_type {
|
||||||
hive
|
hive
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const std::set<sidechain_type> active_sidechain_types = {sidechain_type::bitcoin, sidechain_type::hive};
|
||||||
|
|
||||||
} }
|
} }
|
||||||
|
|
||||||
FC_REFLECT_ENUM(graphene::chain::sidechain_type,
|
FC_REFLECT_ENUM(graphene::chain::sidechain_type,
|
||||||
|
|
@ -21,4 +24,4 @@ FC_REFLECT_ENUM(graphene::chain::sidechain_type,
|
||||||
(ethereum)
|
(ethereum)
|
||||||
(eos)
|
(eos)
|
||||||
(hive)
|
(hive)
|
||||||
(peerplays) )
|
(peerplays) )
|
||||||
|
|
@ -71,12 +71,13 @@ namespace graphene { namespace chain {
|
||||||
public_key_type signing_key;
|
public_key_type signing_key;
|
||||||
vesting_balance_id_type pay_vb;
|
vesting_balance_id_type pay_vb;
|
||||||
son_statistics_id_type statistics;
|
son_statistics_id_type statistics;
|
||||||
//! Fixme - delete sidechain type from here
|
|
||||||
flat_map<sidechain_type, son_status> statuses = []()
|
flat_map<sidechain_type, son_status> statuses = []()
|
||||||
{
|
{
|
||||||
flat_map<sidechain_type, son_status> statuses;
|
flat_map<sidechain_type, son_status> statuses;
|
||||||
statuses[sidechain_type::bitcoin] = son_status::inactive;
|
for(const auto& active_sidechain_type : active_sidechain_types)
|
||||||
statuses[sidechain_type::hive] = son_status::inactive;
|
{
|
||||||
|
statuses[active_sidechain_type] = son_status::inactive;
|
||||||
|
}
|
||||||
return statuses;
|
return statuses;
|
||||||
}();
|
}();
|
||||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue