This fixes a race condition in node.node_receive_quorum. Election creation is done after transaction commit so there isn't a guarantee the election will be created as the block is observable in the ledger. (#2971)
This commit is contained in:
parent
b36a1f63fe
commit
abf9014568
1 changed files with 1 additions and 0 deletions
|
|
@ -256,6 +256,7 @@ TEST (node, node_receive_quorum)
|
||||||
.build_shared ();
|
.build_shared ();
|
||||||
node1.process_active (send);
|
node1.process_active (send);
|
||||||
ASSERT_TIMELY (10s, node1.ledger.block_exists (send->hash ()));
|
ASSERT_TIMELY (10s, node1.ledger.block_exists (send->hash ()));
|
||||||
|
ASSERT_TIMELY (10s, node1.active.election (nano::qualified_root (previous, previous)) != nullptr);
|
||||||
auto election (node1.active.election (nano::qualified_root (previous, previous)));
|
auto election (node1.active.election (nano::qualified_root (previous, previous)));
|
||||||
ASSERT_NE (nullptr, election);
|
ASSERT_NE (nullptr, election);
|
||||||
ASSERT_FALSE (election->confirmed ());
|
ASSERT_FALSE (election->confirmed ());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue