Move uiInterface.NotifyBlockTip signal above the core/wallet signal
- This will keep getbestblockhash more in sync with blocknotify callbacks
This commit is contained in:
parent
4082e46603
commit
9af5f9cb87
1 changed files with 31 additions and 28 deletions
|
@ -2606,6 +2606,10 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
|
||||||
// When we reach this point, we switched to a new tip (stored in pindexNewTip).
|
// When we reach this point, we switched to a new tip (stored in pindexNewTip).
|
||||||
|
|
||||||
// Notifications/callbacks that can run without cs_main
|
// Notifications/callbacks that can run without cs_main
|
||||||
|
// Always notify the UI if a new block tip was connected
|
||||||
|
if (pindexFork != pindexNewTip) {
|
||||||
|
uiInterface.NotifyBlockTip(fInitialDownload, pindexNewTip);
|
||||||
|
|
||||||
if (!fInitialDownload) {
|
if (!fInitialDownload) {
|
||||||
// Find the hashes of all blocks that weren't previously in the best chain.
|
// Find the hashes of all blocks that weren't previously in the best chain.
|
||||||
std::vector<uint256> vHashes;
|
std::vector<uint256> vHashes;
|
||||||
|
@ -2638,8 +2642,7 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
|
||||||
GetMainSignals().UpdatedBlockTip(pindexNewTip);
|
GetMainSignals().UpdatedBlockTip(pindexNewTip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Always notify the UI if a new block tip was connected
|
}
|
||||||
uiInterface.NotifyBlockTip(fInitialDownload, pindexNewTip);
|
|
||||||
} while(pindexMostWork != chainActive.Tip());
|
} while(pindexMostWork != chainActive.Tip());
|
||||||
CheckBlockIndex(chainparams.GetConsensus());
|
CheckBlockIndex(chainparams.GetConsensus());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue