Skip to content

Commit

Permalink
TSAN error in confirmation height unbounded (#3106)
Browse files Browse the repository at this point in the history
  • Loading branch information
wezrule authored Mar 1, 2021
1 parent 72b8fdd commit 8a5dfee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nano/node/confirmation_height_unbounded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void nano::confirmation_height_unbounded::process ()
debug_assert (current == original_block->hash ());
// This is the original block passed so can use it directly
block = original_block;
nano::lock_guard<std::mutex> guard (block_cache_mutex);
block_cache[original_block->hash ()] = original_block;
}
else
Expand Down Expand Up @@ -206,6 +207,7 @@ void nano::confirmation_height_unbounded::collect_unconfirmed_receive_and_source
{
debug_assert (hash == hash_a);
block = block_a;
nano::lock_guard<std::mutex> guard (block_cache_mutex);
block_cache[hash] = block_a;
}
else
Expand Down

0 comments on commit 8a5dfee

Please # to comment.