Compare commits

...

2 commits

Author SHA1 Message Date
Alfredo Garcia
1b3c790aa6
adapt son_pay_test to dormant vesting policy 2019-10-21 17:57:31 -03:00
Alfredo Garcia
42260b5532
fix build error 2019-10-21 16:02:10 -03:00
2 changed files with 15 additions and 4 deletions

View file

@ -134,6 +134,7 @@ namespace graphene { namespace chain {
}
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
}
inline uint16_t son_pay_daily_max()const {
return extensions.value.son_pay_daily_max.valid() ? *extensions.value.son_pay_daily_max : MIN_SON_PAY_DAILY_MAX;
}

View file

@ -293,7 +293,10 @@ BOOST_AUTO_TEST_CASE( son_pay_test )
vesting_balance_create_operation op;
op.creator = alice_id;
op.owner = alice_id;
op.amount = asset(10);
op.amount = asset(50*GRAPHENE_BLOCKCHAIN_PRECISION);
op.balance_type = vesting_balance_type::son;
op.policy = dormant_vesting_policy_initializer {};
trx.operations.push_back(op);
for( auto& op : trx.operations ) db.current_fee_schedule().set_fee(op);
set_expiration(db, trx);
@ -308,7 +311,9 @@ BOOST_AUTO_TEST_CASE( son_pay_test )
vesting_balance_create_operation op;
op.creator = alice_id;
op.owner = alice_id;
op.amount = asset(10);
op.amount = asset(1*GRAPHENE_BLOCKCHAIN_PRECISION);
op.balance_type = vesting_balance_type::normal;
trx.operations.push_back(op);
for( auto& op : trx.operations ) db.current_fee_schedule().set_fee(op);
set_expiration(db, trx);
@ -323,7 +328,10 @@ BOOST_AUTO_TEST_CASE( son_pay_test )
vesting_balance_create_operation op;
op.creator = bob_id;
op.owner = bob_id;
op.amount = asset(10);
op.amount = asset(50*GRAPHENE_BLOCKCHAIN_PRECISION);
op.balance_type = vesting_balance_type::son;
op.policy = dormant_vesting_policy_initializer {};
trx.operations.push_back(op);
for( auto& op : trx.operations ) db.current_fee_schedule().set_fee(op);
set_expiration(db, trx);
@ -338,7 +346,9 @@ BOOST_AUTO_TEST_CASE( son_pay_test )
vesting_balance_create_operation op;
op.creator = bob_id;
op.owner = bob_id;
op.amount = asset(10);
op.amount = asset(1*GRAPHENE_BLOCKCHAIN_PRECISION);
op.balance_type = vesting_balance_type::normal;
trx.operations.push_back(op);
for( auto& op : trx.operations ) db.current_fee_schedule().set_fee(op);
set_expiration(db, trx);