Support specifying cliff_seconds in initial_vesting_balances
This commit is contained in:
parent
ea7e8e6f31
commit
38b2767567
2 changed files with 3 additions and 2 deletions
|
|
@ -702,7 +702,7 @@ void database::init_genesis(const genesis_state_type& genesis_state)
|
||||||
|
|
||||||
linear_vesting_policy policy;
|
linear_vesting_policy policy;
|
||||||
policy.begin_timestamp = vest.begin_timestamp;
|
policy.begin_timestamp = vest.begin_timestamp;
|
||||||
policy.vesting_cliff_seconds = 0;
|
policy.vesting_cliff_seconds = vest.vesting_cliff_seconds ? *vest.vesting_cliff_seconds : 0;
|
||||||
policy.vesting_duration_seconds = vest.vesting_duration_seconds;
|
policy.vesting_duration_seconds = vest.vesting_duration_seconds;
|
||||||
policy.begin_balance = vest.begin_balance;
|
policy.begin_balance = vest.begin_balance;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ struct genesis_state_type {
|
||||||
string asset_symbol;
|
string asset_symbol;
|
||||||
share_type amount;
|
share_type amount;
|
||||||
time_point_sec begin_timestamp;
|
time_point_sec begin_timestamp;
|
||||||
|
fc::optional<uint32_t> vesting_cliff_seconds;
|
||||||
uint32_t vesting_duration_seconds = 0;
|
uint32_t vesting_duration_seconds = 0;
|
||||||
share_type begin_balance;
|
share_type begin_balance;
|
||||||
};
|
};
|
||||||
|
|
@ -180,7 +181,7 @@ FC_REFLECT(graphene::chain::genesis_state_type::initial_balance_type,
|
||||||
(owner)(asset_symbol)(amount))
|
(owner)(asset_symbol)(amount))
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_vesting_balance_type,
|
FC_REFLECT(graphene::chain::genesis_state_type::initial_vesting_balance_type,
|
||||||
(owner)(asset_symbol)(amount)(begin_timestamp)(vesting_duration_seconds)(begin_balance))
|
(owner)(asset_symbol)(amount)(begin_timestamp)(vesting_cliff_seconds)(vesting_duration_seconds)(begin_balance))
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_witness_type, (owner_name)(block_signing_key))
|
FC_REFLECT(graphene::chain::genesis_state_type::initial_witness_type, (owner_name)(block_signing_key))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue