From 98b2d2057c9c88cef3551efe8654692a121315d2 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Mon, 24 Apr 2023 20:23:45 +0200 Subject: [PATCH] SideChain: fixed data race --- src/side_chain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/side_chain.cpp b/src/side_chain.cpp index 551dc01..b461b85 100644 --- a/src/side_chain.cpp +++ b/src/side_chain.cpp @@ -1123,6 +1123,8 @@ uint64_t SideChain::bottom_height(const PoolBlock* tip) const uint64_t bottom_height; std::vector shares; + ReadLock lock(m_sidechainLock); + if (!get_shares(tip, shares, &bottom_height, true)) { return 0; }