Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Add proxied votes check in tests #820
Browse files Browse the repository at this point in the history
  • Loading branch information
maslenitsa93 committed Jul 24, 2019
1 parent 32c8b6a commit d5aadc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/tests/operation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,8 @@ BOOST_FIXTURE_TEST_SUITE(operation_tests, clean_database_fixture)
BOOST_CHECK_NO_THROW(push_tx_with_ops(tx, bob_private_key, proxy_op));
generate_block();

BOOST_CHECK_GT(db->get_witness("witness0").votes, db->get_account("alice").vesting_shares.amount / 3);
BOOST_CHECK_EQUAL(db->get_account("alice").witness_vote_weight() / 3,
(db->get_account("alice").vesting_shares.amount + db->get_account("bob").vesting_shares.amount) / 3);
APPROX_CHECK_EQUAL(db->get_witness("witness0").votes.value, db->get_account("alice").witness_vote_weight().value / 3, 1);
APPROX_CHECK_EQUAL(db->get_witness("witness1").votes.value, db->get_account("alice").witness_vote_weight().value / 3, 1);
APPROX_CHECK_EQUAL(db->get_witness("witness2").votes.value, db->get_account("alice").witness_vote_weight().value / 3, 1);
Expand Down

0 comments on commit d5aadc9

Please sign in to comment.