Skip to content

Commit

Permalink
Ensure vote has gone out before rolling back, otherwise the vote migh…
Browse files Browse the repository at this point in the history
…t not be generated.
  • Loading branch information
clemahieu committed Jan 11, 2021
1 parent d727ec3 commit f4d7df7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nano/core_test/voting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ TEST (vote_spacing, rapid)
.build_shared ();
ASSERT_EQ (nano::process_result::progress, node.ledger.process (node.store.tx_begin_write (), *send1).code);
node.active.generator.add (nano::genesis_hash, send1->hash ());
ASSERT_TIMELY (3s, node.stats.count (nano::stat::type::vote_generator, nano::stat::detail::generator_broadcasts) == 1);
ASSERT_FALSE (node.ledger.rollback (node.store.tx_begin_write (), send1->hash ()));
ASSERT_EQ (nano::process_result::progress, node.ledger.process (node.store.tx_begin_write (), *send2).code);
node.active.generator.add (nano::genesis_hash, send2->hash ());
Expand Down

0 comments on commit f4d7df7

Please sign in to comment.