diff --git a/nano/node/confirmation_height_unbounded.cpp b/nano/node/confirmation_height_unbounded.cpp index b9cf5d420..ee9d327ac 100644 --- a/nano/node/confirmation_height_unbounded.cpp +++ b/nano/node/confirmation_height_unbounded.cpp @@ -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 guard (block_cache_mutex); block_cache[original_block->hash ()] = original_block; } else @@ -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 guard (block_cache_mutex); block_cache[hash] = block_a; } else