add son vesting config options

This commit is contained in:
Alfredo Garcia 2019-10-09 15:54:57 -03:00
parent e2c579bb02
commit c6ef1870cb
2 changed files with 13 additions and 0 deletions

View file

@ -228,3 +228,6 @@
#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 SON_VESTING_AMOUNT 50 // 50 PPY
#define SON_VESTING_PERIOD (60*60*24*30) // 2 days

View file

@ -43,6 +43,8 @@ namespace graphene { namespace chain {
optional < uint32_t > gpos_period;
optional < uint32_t > gpos_subperiod;
optional < uint32_t > gpos_period_start;
optional < uint32_t > son_vesting_amount;
optional < uint32_t > son_vesting_period;
};
struct chain_parameters
@ -121,6 +123,12 @@ 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 uint32_t son_vesting_amount()const {
return extensions.value.son_vesting_amount.valid() ? *extensions.value.son_vesting_amount : SON_VESTING_AMOUNT; /// current period start date
}
inline uint32_t son_vesting_period()const {
return extensions.value.son_vesting_period.valid() ? *extensions.value.son_vesting_period : SON_VESTING_PERIOD; /// current period start date
}
};
} } // graphene::chain
@ -134,6 +142,8 @@ FC_REFLECT( graphene::chain::parameter_extension,
(gpos_period)
(gpos_subperiod)
(gpos_period_start)
(son_vesting_amount)
(son_vesting_period)
)
FC_REFLECT( graphene::chain::chain_parameters,