Skip to content

Commit

Permalink
GH-1916 Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Nov 22, 2023
1 parent df9ce4a commit 2520c4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unittests/api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3886,13 +3886,13 @@ BOOST_AUTO_TEST_CASE(set_finalizer_test) { try {
BOOST_TEST(block->confirmed == 0);
block_state_ptr block_state = t.control->fetch_block_state_by_id(block->calculate_id());
BOOST_REQUIRE(!!block_state);
BOOST_TEST(block_state->dpos_irreversible_blocknum > 2);
BOOST_TEST(block_state->dpos_irreversible_blocknum != hs_dpos_irreversible_blocknum);

block = t.produce_block(); // only one producer so now this block is irreversible, next block will be hotstuff
BOOST_TEST(block->confirmed == 0);
block_state = t.control->fetch_block_state_by_id(block->calculate_id());
BOOST_REQUIRE(!!block_state);
BOOST_TEST(block_state->dpos_irreversible_blocknum > 2);
BOOST_TEST(block_state->dpos_irreversible_blocknum != hs_dpos_irreversible_blocknum);

block = t.produce_block(); // hotstuff now active
BOOST_TEST(block->confirmed == std::numeric_limits<uint16_t>::max());
Expand Down

0 comments on commit 2520c4c

Please sign in to comment.