From e222cd165b96b371f3638ca17e537bbb6a393433 Mon Sep 17 00:00:00 2001 From: Guilherme Lawless Date: Thu, 7 May 2020 15:42:36 +0100 Subject: [PATCH] [TSAN] Fix race in local_vote_history::size --- nano/node/voting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nano/node/voting.cpp b/nano/node/voting.cpp index 4fc49df646..9af587faae 100644 --- a/nano/node/voting.cpp +++ b/nano/node/voting.cpp @@ -103,6 +103,7 @@ void nano::local_vote_history::clean () size_t nano::local_vote_history::size () const { + nano::lock_guard guard (mutex); return history.size (); }