Fix failing gpos tests
This commit is contained in:
parent
99a7d8453c
commit
e3ff3bf7bc
1 changed files with 4 additions and 4 deletions
|
|
@ -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<vesting_balance_worker_type>().balance(db).balance.amount.value, 10);
|
||||
BOOST_CHECK_EQUAL(worker.worker.get<vesting_balance_worker_type>().balance(db).balance.amount.value, 10);
|
||||
BOOST_CHECK_EQUAL(worker_id_type()(db).worker.get<vesting_balance_worker_type>().balance(db).balance.amount.value, 5);
|
||||
BOOST_CHECK_EQUAL(worker.worker.get<vesting_balance_worker_type>().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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue