From 647319b731bb61338f3c055fa437cf613761c8f6 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Mon, 9 Jan 2023 00:33:37 +0100 Subject: [PATCH] Added missing check to `update_chain_tip` --- src/side_chain.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/side_chain.cpp b/src/side_chain.cpp index 35c3368..02f242e 100644 --- a/src/side_chain.cpp +++ b/src/side_chain.cpp @@ -1653,6 +1653,11 @@ void SideChain::update_chain_tip(const PoolBlock* block) const PoolBlock* tip = m_chainTip; + if (block == tip) { + LOGINFO(5, "Trying to update chain tip to the same block again. Ignoring it."); + return; + } + bool is_alternative; if (is_longer_chain(tip, block, is_alternative)) { difficulty_type diff;