Skip to content

Commit

Permalink
Fix race condition identified by TSAN when computing hash
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Nov 6, 2023
1 parent dc536b9 commit 906cbbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nano/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,8 @@ TEST (node, block_confirm)
auto send1_copy = builder.make_block ()
.from (*send1)
.build_shared ();
auto hash1 = send1->hash ();
auto hash2 = send1_copy->hash ();
node1.block_processor.add (send1);
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 ()));
Expand Down

0 comments on commit 906cbbf

Please sign in to comment.