fix: make masternodeSync available as early as possible (#5060)

This commit is contained in:
UdjinM6 2022-10-25 07:42:48 +03:00 committed by GitHub
parent 90bb674ac0
commit e04b31cb9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1791,6 +1791,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
::governance = std::make_unique<CGovernanceManager>();
assert(!::sporkManager);
::sporkManager = std::make_unique<CSporkManager>();
::masternodeSync = std::make_unique<CMasternodeSync>(*node.connman);
std::vector<std::string> vSporkAddresses;
if (args.IsArgSet("-sporkaddr")) {
@ -2316,7 +2317,6 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
// ********************************************************* Step 10a: Setup CoinJoin
::masternodeSync = std::make_unique<CMasternodeSync>(*node.connman);
::coinJoinServer = std::make_unique<CCoinJoinServer>(*node.connman);
#ifdef ENABLE_WALLET
::coinJoinClientQueueManager = std::make_unique<CCoinJoinClientQueueManager>(*node.connman);