diff options
Diffstat (limited to 'src/init.h')
-rw-r--r-- | src/init.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/init.h b/src/init.h index c58ba5cfd3..1c59ca069e 100644 --- a/src/init.h +++ b/src/init.h @@ -8,10 +8,19 @@ #include <memory> #include <string> -#include <util.h> +#include <util/system.h> -class CScheduler; -class CWallet; +namespace interfaces { +class Chain; +class ChainClient; +} // namespace interfaces + +//! Pointers to interfaces used during init and destroyed on shutdown. +struct InitInterfaces +{ + std::unique_ptr<interfaces::Chain> chain; + std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients; +}; namespace boost { @@ -20,7 +29,7 @@ class thread_group; /** Interrupt threads */ void Interrupt(); -void Shutdown(); +void Shutdown(InitInterfaces& interfaces); //!Initialize the logging infrastructure void InitLogging(); //!Parameter interaction: change current parameters depending on various rules @@ -54,7 +63,7 @@ bool AppInitLockDataDirectory(); * @note This should only be done after daemonization. Call Shutdown() if this function fails. * @pre Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called. */ -bool AppInitMain(); +bool AppInitMain(InitInterfaces& interfaces); /** * Setup the arguments for gArgs |