Compare commits

...

2 commits

Author SHA1 Message Date
gladcow
aa2ec6d7e4 remove optional fields from reflection list 2019-12-20 16:24:52 +03:00
gladcow
58e4b741c4 make new fields optional 2019-12-20 00:46:43 +03:00
2 changed files with 15 additions and 14 deletions

View file

@ -80,12 +80,12 @@ namespace graphene { namespace chain {
{
struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; };
asset fee;
account_id_type creator; ///< Who provides funds initially
account_id_type owner; ///< Who is able to withdraw the balance
asset amount;
vesting_policy_initializer policy;
vesting_balance_type balance_type;
asset fee;
account_id_type creator; ///< Who provides funds initially
account_id_type owner; ///< Who is able to withdraw the balance
asset amount;
vesting_policy_initializer policy;
optional<vesting_balance_type> balance_type;
account_id_type fee_payer()const { return creator; }
void validate()const
@ -108,11 +108,11 @@ namespace graphene { namespace chain {
{
struct fee_parameters_type { uint64_t fee = 20*GRAPHENE_BLOCKCHAIN_PRECISION; };
asset fee;
vesting_balance_id_type vesting_balance;
account_id_type owner; ///< Must be vesting_balance.owner
asset amount;
vesting_balance_type balance_type;
asset fee;
vesting_balance_id_type vesting_balance;
account_id_type owner; ///< Must be vesting_balance.owner
asset amount;
optional<vesting_balance_type> balance_type;
account_id_type fee_payer()const { return owner; }
void validate()const
@ -127,8 +127,8 @@ namespace graphene { namespace chain {
FC_REFLECT( graphene::chain::vesting_balance_create_operation::fee_parameters_type, (fee) )
FC_REFLECT( graphene::chain::vesting_balance_withdraw_operation::fee_parameters_type, (fee) )
FC_REFLECT( graphene::chain::vesting_balance_create_operation, (fee)(creator)(owner)(amount)(policy)(balance_type) )
FC_REFLECT( graphene::chain::vesting_balance_withdraw_operation, (fee)(vesting_balance)(owner)(amount)(balance_type) )
FC_REFLECT( graphene::chain::vesting_balance_create_operation, (fee)(creator)(owner)(amount)(policy) )
FC_REFLECT( graphene::chain::vesting_balance_withdraw_operation, (fee)(vesting_balance)(owner)(amount) )
FC_REFLECT(graphene::chain::linear_vesting_policy_initializer, (begin_timestamp)(vesting_cliff_seconds)(vesting_duration_seconds) )
FC_REFLECT(graphene::chain::cdd_vesting_policy_initializer, (start_claim)(vesting_seconds) )

View file

@ -108,7 +108,8 @@ object_id_type vesting_balance_create_evaluator::do_apply( const vesting_balance
else {
op.policy.visit(init_policy_visitor(obj.policy, op.amount.amount, now));
}
obj.balance_type = op.balance_type;
if(op.balance_type)
obj.balance_type = *op.balance_type;
} );