Fix race condition identified by TSAN when computing hash
This commit is contained in:
parent
dc536b93a6
commit
906cbbf541
1 changed files with 2 additions and 0 deletions
|
|
@ -2143,6 +2143,8 @@ TEST (node, block_confirm)
|
||||||
auto send1_copy = builder.make_block ()
|
auto send1_copy = builder.make_block ()
|
||||||
.from (*send1)
|
.from (*send1)
|
||||||
.build_shared ();
|
.build_shared ();
|
||||||
|
auto hash1 = send1->hash ();
|
||||||
|
auto hash2 = send1_copy->hash ();
|
||||||
node1.block_processor.add (send1);
|
node1.block_processor.add (send1);
|
||||||
node2.block_processor.add (send1_copy);
|
node2.block_processor.add (send1_copy);
|
||||||
ASSERT_TIMELY (5s, node1.ledger.block_or_pruned_exists (send1->hash ()) && node2.ledger.block_or_pruned_exists (send1_copy->hash ()));
|
ASSERT_TIMELY (5s, node1.ledger.block_or_pruned_exists (send1->hash ()) && node2.ledger.block_or_pruned_exists (send1_copy->hash ()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue