diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/init.cpp b/src/init.cpp index 07e882c9df..4298494916 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -22,9 +22,9 @@ #include <httpserver.h> #include <index/blockfilterindex.h> #include <index/txindex.h> +#include <init/common.h> #include <interfaces/chain.h> #include <interfaces/node.h> -#include <key.h> #include <mapport.h> #include <miner.h> #include <net.h> @@ -151,8 +151,6 @@ static fs::path GetPidFile(const ArgsManager& args) // shutdown thing. // -static std::unique_ptr<ECCVerifyHandle> globalVerifyHandle; - void Interrupt(NodeContext& node) { InterruptHTTPServer(); @@ -286,8 +284,7 @@ void Shutdown(NodeContext& node) node.chain_clients.clear(); UnregisterAllValidationInterfaces(); GetMainSignals().UnregisterBackgroundSignalScheduler(); - globalVerifyHandle.reset(); - ECC_Stop(); + init::UnsetGlobals(); node.mempool.reset(); node.fee_estimator.reset(); node.chainman = nullptr; @@ -1148,12 +1145,7 @@ bool AppInitSanityChecks() { // ********************************************************* Step 4: sanity checks - // Initialize elliptic curve code - std::string sha256_algo = SHA256AutoDetect(); - LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo); - RandomInit(); - ECC_Start(); - globalVerifyHandle.reset(new ECCVerifyHandle()); + init::SetGlobals(); // Sanity check if (!InitSanityCheck()) |