mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
node: Track last block that received a blockTip notification
Also signal m_tip_block_cv when StopRPC is called, for consistency with g_best_block_cv. This is handled in StopRPC instead of OnRPCStopped() because the latter is deleted in a later commit. Co-authored-by: TheCharlatan <seb.kung@gmail.com> Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
parent
ebb8215f23
commit
7eccdaf160
6 changed files with 27 additions and 6 deletions
|
|
@ -50,6 +50,12 @@ namespace node {
|
|||
|
||||
kernel::InterruptResult KernelNotifications::blockTip(SynchronizationState state, CBlockIndex& index)
|
||||
{
|
||||
{
|
||||
LOCK(m_tip_block_mutex);
|
||||
m_tip_block = index.GetBlockHash();
|
||||
m_tip_block_cv.notify_all();
|
||||
}
|
||||
|
||||
uiInterface.NotifyBlockTip(state, &index);
|
||||
if (m_stop_at_height && index.nHeight >= m_stop_at_height) {
|
||||
if (!m_shutdown()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue