From e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 17 Sep 2019 18:28:03 -0400 Subject: Pass NodeContext, ConnMan, BanMan references more places So g_connman and g_banman globals can be removed next commit. --- src/init.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 664c2b347..6409f0a41 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -154,7 +155,7 @@ static std::unique_ptr globalVerifyHandle; static boost::thread_group threadGroup; static CScheduler scheduler; -void Interrupt() +void Interrupt(NodeContext& node) { InterruptHTTPServer(); InterruptHTTPRPC(); @@ -1819,8 +1820,9 @@ bool AppInitMain(NodeContext& node) client->start(scheduler); } - scheduler.scheduleEvery([]{ - g_banman->DumpBanlist(); + BanMan* banman = g_banman.get(); + scheduler.scheduleEvery([banman]{ + banman->DumpBanlist(); }, DUMP_BANS_INTERVAL * 1000); return true; -- cgit v1.2.3