Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SON11 - Add chain extension parameter to set SON count #135

Merged
merged 1 commit into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/chain/include/graphene/chain/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,4 @@
#define TOURNAMENT_MAX_START_DELAY (60*60*24*7) // 1 week
#define GPOS_PERIOD (60*60*24*30*6) // 6 months
#define GPOS_SUBPERIOD (60*60*24*30) // 1 month
#define MIN_SON_MEMBER_COUNT 15
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace graphene { namespace chain {
optional < uint32_t > gpos_period;
optional < uint32_t > gpos_subperiod;
optional < uint32_t > gpos_period_start;
optional < uint16_t > son_count;
};

struct chain_parameters
Expand Down Expand Up @@ -121,6 +122,9 @@ namespace graphene { namespace chain {
inline uint32_t gpos_period_start()const {
return extensions.value.gpos_period_start.valid() ? *extensions.value.gpos_period_start : HARDFORK_GPOS_TIME.sec_since_epoch(); /// current period start date
}
inline uint16_t son_count()const {
return extensions.value.son_count.valid() ? *extensions.value.son_count : MIN_SON_MEMBER_COUNT;
}
};

} } // graphene::chain
Expand All @@ -134,6 +138,7 @@ FC_REFLECT( graphene::chain::parameter_extension,
(gpos_period)
(gpos_subperiod)
(gpos_period_start)
(son_count)
)

FC_REFLECT( graphene::chain::chain_parameters,
Expand Down