From 220e166e47bcf34d6e69081d703a64f27c7ea5a6 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Mon, 30 Nov 2015 11:32:13 +0100 Subject: [PATCH] Move uiInterface.NotifyBlockTip signal above the core/wallet signal - This will keep getbestblockhash more in sync with blocknotify callbacks --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e8f931819..c364927a4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3628,6 +3628,8 @@ bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, // When we reach this point, we switched to a new tip (stored in pindexNewTip). // Notifications/callbacks that can run without cs_main + // Always notify the UI if a new block tip was connected + uiInterface.NotifyBlockTip(fInitialDownload, pindexNewTip); if (!fInitialDownload) { uint256 hashNewTip = pindexNewTip->GetBlockHash(); // Relay inventory, but don't relay old inventory during initial block download. @@ -3643,8 +3645,6 @@ bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, // Notify external listeners about the new tip. GetMainSignals().UpdatedBlockTip(pindexNewTip); } - // Always notify the UI if a new block tip was connected - uiInterface.NotifyBlockTip(fInitialDownload, pindexNewTip); } while(pindexMostWork != chainActive.Tip()); CheckBlockIndex(chainparams.GetConsensus());