diff options
| author | Russell Yanofsky <[email protected]> | 2019-09-17 18:28:03 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2019-10-28 10:30:51 -0400 |
| commit | e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d (patch) | |
| tree | 1c12f814ae2ac88316066d334274354c669d7aa5 /src/init.cpp | |
| parent | MOVEONLY: Move NodeContext struct to node/context.h (diff) | |
| download | discoin-e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d.tar.xz discoin-e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d.zip | |
Pass NodeContext, ConnMan, BanMan references more places
So g_connman and g_banman globals can be removed next commit.
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <net_permissions.h> #include <net_processing.h> #include <netbase.h> +#include <node/context.h> #include <policy/feerate.h> #include <policy/fees.h> #include <policy/policy.h> @@ -154,7 +155,7 @@ static std::unique_ptr<ECCVerifyHandle> 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; |