From b6fc20716092cf26cf474132b0bd499d2bb117d8 Mon Sep 17 00:00:00 2001
From: pbattu123
Date: Fri, 20 Dec 2019 22:16:09 -0400
Subject: [PATCH] gpos tests fix
---
tests/tests/gpos_tests.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/tests/gpos_tests.cpp b/tests/tests/gpos_tests.cpp
index e9543d60..aa9969ee 100644
--- a/tests/tests/gpos_tests.cpp
+++ b/tests/tests/gpos_tests.cpp
@@ -1057,9 +1057,9 @@ BOOST_AUTO_TEST_CASE( Withdraw_gpos_vesting_balance )
transfer( committee_account, bob_id, core.amount( 99 ) );
// add some vesting to Alice, Bob
- vesting_balance_object vbo;
- create_vesting(alice_id, core.amount(150), vesting_balance_type::gpos);
- create_vesting(bob_id, core.amount(99), vesting_balance_type::gpos);
+ vesting_balance_object vbo1, vbo2;
+ vbo1 = create_vesting(alice_id, core.amount(150), 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_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_global_properties().parameters.gpos_vesting_lockin_period());
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(vbo.id, bob_id, core.amount(99), /*vesting_balance_type::gpos, */bob_private_key);
+ withdraw_gpos_vesting(vbo1.id, alice_id, core.amount(50), /*vesting_balance_type::gpos, */alice_private_key);
+ withdraw_gpos_vesting(vbo2.id, bob_id, core.amount(99), /*vesting_balance_type::gpos, */bob_private_key);
generate_block();
// verify charles balance
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
// total vesting balance of user
- create_vesting(alice_id, core.amount(50), vesting_balance_type::gpos);
- create_vesting(alice_id, core.amount(73), vesting_balance_type::gpos);
+ vbo1 = create_vesting(alice_id, core.amount(50), 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_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_global_properties().parameters.gpos_vesting_lockin_period());
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();
// verify alice balance
BOOST_CHECK_EQUAL(get_balance(alice_id(db), core), 367);