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:
Sjors Provoost
2024-08-26 18:16:08 +02:00
parent ebb8215f23
commit 7eccdaf160
6 changed files with 27 additions and 6 deletions

View File

@@ -139,7 +139,7 @@ public:
// Stop RPC for clean shutdown if any of waitfor* commands is executed.
if (args().GetBoolArg("-server", false)) {
InterruptRPC();
StopRPC();
StopRPC(m_context);
}
}
bool shutdownRequested() override { return ShutdownRequested(*Assert(m_context)); };