mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge bitcoin/bitcoin#31346: Set notifications m_tip_block in LoadChainTip()
37946c0aafSet notifications m_tip_block in LoadChainTip() (Sjors Provoost) Pull request description: Ensure KernelNotifications `m_tip_block` is set even if no new block arrives. Suggested in https://github.com/bitcoin/bitcoin/pull/31297#issuecomment-2486457573 ACKs for top commit: ryanofsky: Code review ACK37946c0aaf, fixing comment bug caught by @mzumsande in https://github.com/bitcoin/bitcoin/pull/31346#discussion_r1870315593 in another really helpful clarification mzumsande: Code Review ACK37946c0aafTheCharlatan: ACK37946c0aafTree-SHA512: 931bf820440a0cdda276f6dbd63f03fdbcdc90b18e7d5e160a74bdd9d0290acc706c35aab15bbdcd6e5e0b77565b3d07ff49b0dcf6551cb83961bae67be5d1bb
This commit is contained in:
commit
d73f37dda2
5 changed files with 26 additions and 8 deletions
|
|
@ -4721,6 +4721,13 @@ bool Chainstate::LoadChainTip()
|
|||
m_chain.Height(),
|
||||
FormatISO8601DateTime(tip->GetBlockTime()),
|
||||
GuessVerificationProgress(m_chainman.GetParams().TxData(), tip));
|
||||
|
||||
// Ensure KernelNotifications m_tip_block is set even if no new block arrives.
|
||||
if (this->GetRole() != ChainstateRole::BACKGROUND) {
|
||||
// Ignoring return value for now.
|
||||
(void)m_chainman.GetNotifications().blockTip(GetSynchronizationState(/*init=*/true, m_chainman.m_blockman.m_blockfiles_indexed), *pindex);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue