gpos tests fix
This commit is contained in:
parent
054f06adc7
commit
b6fc207160
1 changed files with 8 additions and 8 deletions
|
|
@ -1057,9 +1057,9 @@ BOOST_AUTO_TEST_CASE( Withdraw_gpos_vesting_balance )
|
||||||
transfer( committee_account, bob_id, core.amount( 99 ) );
|
transfer( committee_account, bob_id, core.amount( 99 ) );
|
||||||
|
|
||||||
// add some vesting to Alice, Bob
|
// add some vesting to Alice, Bob
|
||||||
vesting_balance_object vbo;
|
vesting_balance_object vbo1, vbo2;
|
||||||
create_vesting(alice_id, core.amount(150), vesting_balance_type::gpos);
|
vbo1 = create_vesting(alice_id, core.amount(150), vesting_balance_type::gpos);
|
||||||
create_vesting(bob_id, core.amount(99), vesting_balance_type::gpos);
|
vbo2 = create_vesting(bob_id, core.amount(99), vesting_balance_type::gpos);
|
||||||
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
||||||
|
|
||||||
generate_block();
|
generate_block();
|
||||||
|
|
@ -1067,8 +1067,8 @@ BOOST_AUTO_TEST_CASE( Withdraw_gpos_vesting_balance )
|
||||||
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
||||||
generate_blocks(db.get_global_properties().parameters.gpos_vesting_lockin_period());
|
generate_blocks(db.get_global_properties().parameters.gpos_vesting_lockin_period());
|
||||||
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 350);
|
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 350);
|
||||||
withdraw_gpos_vesting(vbo.id, alice_id, core.amount(50), /*vesting_balance_type::gpos, */alice_private_key);
|
withdraw_gpos_vesting(vbo1.id, alice_id, core.amount(50), /*vesting_balance_type::gpos, */alice_private_key);
|
||||||
withdraw_gpos_vesting(vbo.id, bob_id, core.amount(99), /*vesting_balance_type::gpos, */bob_private_key);
|
withdraw_gpos_vesting(vbo2.id, bob_id, core.amount(99), /*vesting_balance_type::gpos, */bob_private_key);
|
||||||
generate_block();
|
generate_block();
|
||||||
// verify charles balance
|
// verify charles balance
|
||||||
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 400);
|
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 400);
|
||||||
|
|
@ -1076,8 +1076,8 @@ BOOST_AUTO_TEST_CASE( Withdraw_gpos_vesting_balance )
|
||||||
|
|
||||||
// Add more 50 and 73 vesting objects and withdraw 90 from
|
// Add more 50 and 73 vesting objects and withdraw 90 from
|
||||||
// total vesting balance of user
|
// total vesting balance of user
|
||||||
create_vesting(alice_id, core.amount(50), vesting_balance_type::gpos);
|
vbo1 = create_vesting(alice_id, core.amount(50), vesting_balance_type::gpos);
|
||||||
create_vesting(alice_id, core.amount(73), vesting_balance_type::gpos);
|
vbo2 = create_vesting(alice_id, core.amount(73), vesting_balance_type::gpos);
|
||||||
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
||||||
|
|
||||||
generate_block();
|
generate_block();
|
||||||
|
|
@ -1095,7 +1095,7 @@ BOOST_AUTO_TEST_CASE( Withdraw_gpos_vesting_balance )
|
||||||
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
|
||||||
generate_blocks(db.get_global_properties().parameters.gpos_vesting_lockin_period());
|
generate_blocks(db.get_global_properties().parameters.gpos_vesting_lockin_period());
|
||||||
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 277);
|
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 277);
|
||||||
withdraw_gpos_vesting(vbo.id, alice_id, core.amount(90), /*vesting_balance_type::gpos,*/ alice_private_key);
|
withdraw_gpos_vesting(vbo1.id, alice_id, core.amount(90), /*vesting_balance_type::gpos,*/ alice_private_key);
|
||||||
generate_block();
|
generate_block();
|
||||||
// verify alice balance
|
// verify alice balance
|
||||||
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 367);
|
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 367);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue