From e3ff3bf7bcfa57fca8faf176810d8628f09567c0 Mon Sep 17 00:00:00 2001 From: serkixenos Date: Wed, 9 Dec 2020 14:49:38 +0100 Subject: [PATCH] Fix failing gpos tests --- tests/tests/gpos_tests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tests/gpos_tests.cpp b/tests/tests/gpos_tests.cpp index 6de53eb7..22908c07 100644 --- a/tests/tests/gpos_tests.cpp +++ b/tests/tests/gpos_tests.cpp @@ -905,7 +905,7 @@ BOOST_AUTO_TEST_CASE( worker_dividends_voting ) vote_for(voter1_id, worker.vote_for, voter1_private_key); // first maint pass, coefficient will be 1 - generate_blocks(db.get_dynamic_global_properties().next_maintenance_time); + generate_blocks(HARDFORK_GPOS_TIME + fc::hours(12)); //forward 1/2 sub-period so that it consider only gpos votes worker = worker_id_type()(db); BOOST_CHECK_EQUAL(worker.total_votes_for, 100); @@ -925,8 +925,8 @@ BOOST_AUTO_TEST_CASE( worker_dividends_voting ) generate_blocks(db.get_dynamic_global_properties().next_maintenance_time); // worker is getting paid - BOOST_CHECK_EQUAL(worker_id_type()(db).worker.get().balance(db).balance.amount.value, 10); - BOOST_CHECK_EQUAL(worker.worker.get().balance(db).balance.amount.value, 10); + BOOST_CHECK_EQUAL(worker_id_type()(db).worker.get().balance(db).balance.amount.value, 5); + BOOST_CHECK_EQUAL(worker.worker.get().balance(db).balance.amount.value, 5); // second maint pass, coefficient will be 0.75 worker = worker_id_type()(db); @@ -1009,7 +1009,7 @@ BOOST_AUTO_TEST_CASE( account_multiple_vesting ) vote_for(sam_id, witness1.vote_id, sam_private_key); vote_for(patty_id, witness1.vote_id, patty_private_key); - generate_blocks(db.get_dynamic_global_properties().next_maintenance_time); + generate_blocks(HARDFORK_GPOS_TIME + fc::hours(12)); //forward 1/2 sub-period so that it consider only gpos votes // amount in vested balanced will sum up as voting power witness1 = witness_id_type(1)(db);