mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
validation: only call UpdatedBlockTip for active chainstate
This notification isn't needed for background chainstates. `kernel::Notifications::blockTip` are also skipped.
This commit is contained in:
parent
c6af23c517
commit
1e59acdf17
2 changed files with 2 additions and 2 deletions
|
|
@ -3263,7 +3263,7 @@ bool Chainstate::ActivateBestChain(BlockValidationState& state, std::shared_ptr<
|
|||
|
||||
// Notify external listeners about the new tip.
|
||||
// Enqueue while holding cs_main to ensure that UpdatedBlockTip is called in the order in which blocks are connected
|
||||
if (pindexFork != pindexNewTip) {
|
||||
if (this == &m_chainman.ActiveChainstate() && pindexFork != pindexNewTip) {
|
||||
// Notify ValidationInterface subscribers
|
||||
GetMainSignals().UpdatedBlockTip(pindexNewTip, pindexFork, still_in_ibd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue