1919#include < util/strencodings.h>
2020#include < util/string.h>
2121#include < util/time.h>
22-
23- #include < boost/signals2/signal.hpp>
22+ #include < validation.h>
2423
2524#include < cassert>
2625#include < chrono>
@@ -70,22 +69,6 @@ struct RPCCommandExecution
7069 }
7170};
7271
73- static struct CRPCSignals
74- {
75- boost::signals2::signal<void ()> Started;
76- boost::signals2::signal<void ()> Stopped;
77- } g_rpcSignals;
78-
79- void RPCServer::OnStarted (std::function<void ()> slot)
80- {
81- g_rpcSignals.Started .connect (slot);
82- }
83-
84- void RPCServer::OnStopped (std::function<void ()> slot)
85- {
86- g_rpcSignals.Stopped .connect (slot);
87- }
88-
8972std::string CRPCTable::help (const std::string& strCommand, const JSONRPCRequest& helpreq) const
9073{
9174 std::string strRet;
@@ -298,7 +281,6 @@ void StartRPC()
298281{
299282 LogDebug (BCLog::RPC, " Starting RPC\n " );
300283 g_rpc_running = true ;
301- g_rpcSignals.Started ();
302284}
303285
304286void InterruptRPC ()
@@ -321,10 +303,11 @@ void StopRPC(const std::any& context)
321303 LogDebug (BCLog::RPC, " Stopping RPC\n " );
322304 WITH_LOCK (g_deadline_timers_mutex, deadlineTimers.clear ());
323305 DeleteAuthCookie ();
324- g_rpcSignals. Stopped ();
306+ g_best_block_cv. notify_all ();
325307 node::NodeContext& node = EnsureAnyNodeContext (context);
326308 // The notifications interface doesn't exist between initialization step 4a and 7.
327309 if (node.notifications ) node.notifications ->m_tip_block_cv .notify_all ();
310+ LogDebug (BCLog::RPC, " RPC stopped.\n " );
328311 });
329312}
330313
0 commit comments