Skip to content

Commit

Permalink
[TSAN] Fix race in local_vote_history::size
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermelawless committed May 7, 2020
1 parent 3b1e87c commit e222cd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nano/node/voting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void nano::local_vote_history::clean ()

size_t nano::local_vote_history::size () const
{
nano::lock_guard<std::mutex> guard (mutex);
return history.size ();
}

Expand Down

0 comments on commit e222cd1

Please sign in to comment.