@@ -1716,7 +1716,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
1716
1716
1717
1717
assert (!node.peerman );
1718
1718
node.peerman = PeerManager::make (chainparams, *node.connman , *node.addrman , node.banman .get (),
1719
- *node.scheduler , chainman, *node.mempool , *::governance ,
1719
+ *node.scheduler , chainman, *node.mempool , *node. govman ,
1720
1720
node.cj_ctx , node.llmq_ctx , ignores_incoming_txs);
1721
1721
RegisterValidationInterface (node.peerman .get ());
1722
1722
@@ -1731,25 +1731,25 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
1731
1731
vSporkAddresses = Params ().SporkAddresses ();
1732
1732
}
1733
1733
for (const auto & address: vSporkAddresses) {
1734
- if (!::sporkManager ->SetSporkAddress (address)) {
1734
+ if (!node. sporkman ->SetSporkAddress (address)) {
1735
1735
return InitError (_ (" Invalid spork address specified with -sporkaddr" ));
1736
1736
}
1737
1737
}
1738
1738
1739
1739
int minsporkkeys = args.GetArg (" -minsporkkeys" , Params ().MinSporkKeys ());
1740
- if (!::sporkManager ->SetMinSporkKeys (minsporkkeys)) {
1740
+ if (!node. sporkman ->SetMinSporkKeys (minsporkkeys)) {
1741
1741
return InitError (_ (" Invalid minimum number of spork signers specified with -minsporkkeys" ));
1742
1742
}
1743
1743
1744
1744
1745
1745
if (args.IsArgSet (" -sporkkey" )) { // spork priv key
1746
- if (!::sporkManager ->SetPrivKey (args.GetArg (" -sporkkey" , " " ))) {
1746
+ if (!node. sporkman ->SetPrivKey (args.GetArg (" -sporkkey" , " " ))) {
1747
1747
return InitError (_ (" Unable to sign spork message, wrong key?" ));
1748
1748
}
1749
1749
}
1750
1750
1751
1751
assert (!::masternodeSync);
1752
- ::masternodeSync = std::make_unique<CMasternodeSync>(*node.connman , *::governance );
1752
+ ::masternodeSync = std::make_unique<CMasternodeSync>(*node.connman , *node. govman );
1753
1753
node.mn_sync = ::masternodeSync.get ();
1754
1754
1755
1755
// sanitize comments per BIP-0014, format user agent and check total size
@@ -1873,7 +1873,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
1873
1873
#endif
1874
1874
1875
1875
pdsNotificationInterface = new CDSNotificationInterface (
1876
- *node.connman , *::masternodeSync , ::deterministicMNManager, *::governance , node.llmq_ctx , node.cj_ctx
1876
+ *node.connman , *node. mn_sync , ::deterministicMNManager, *node. govman , node.llmq_ctx , node.cj_ctx
1877
1877
);
1878
1878
RegisterValidationInterface (pdsNotificationInterface);
1879
1879
@@ -1885,7 +1885,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
1885
1885
1886
1886
// ********************************************************* Step 7a: Load sporks
1887
1887
1888
- if (!::sporkManager ->LoadCache ()) {
1888
+ if (!node. sporkman ->LoadCache ()) {
1889
1889
auto file_path = (GetDataDir () / " sporks.dat" ).string ();
1890
1890
return InitError (strprintf (_ (" Failed to load sporks cache from %s" ), file_path));
1891
1891
}
@@ -1978,7 +1978,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
1978
1978
node.llmq_ctx ->Stop ();
1979
1979
}
1980
1980
node.llmq_ctx .reset ();
1981
- node.llmq_ctx .reset (new LLMQContext (chainman.ActiveChainstate (), *node.connman , *node.evodb , *::sporkManager , *node.mempool , node.peerman , false , fReset || fReindexChainState ));
1981
+ node.llmq_ctx .reset (new LLMQContext (chainman.ActiveChainstate (), *node.connman , *node.evodb , *node. sporkman , *node.mempool , node.peerman , false , fReset || fReindexChainState ));
1982
1982
// Have to start it early to let VerifyDB check ChainLock signatures in coinbase
1983
1983
node.llmq_ctx ->Start ();
1984
1984
@@ -2111,11 +2111,11 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
2111
2111
break ; // out of the chainstate activation do-while
2112
2112
}
2113
2113
2114
- if (!deterministicMNManager ->MigrateDBIfNeeded ()) {
2114
+ if (!node. dmnman ->MigrateDBIfNeeded ()) {
2115
2115
strLoadError = _ (" Error upgrading evo database" );
2116
2116
break ;
2117
2117
}
2118
- if (!deterministicMNManager ->MigrateDBIfNeeded2 ()) {
2118
+ if (!node. dmnman ->MigrateDBIfNeeded2 ()) {
2119
2119
strLoadError = _ (" Error upgrading evo database" );
2120
2120
break ;
2121
2121
}
@@ -2219,7 +2219,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
2219
2219
2220
2220
// ********************************************************* Step 7c: Setup CoinJoin
2221
2221
2222
- node.cj_ctx = std::make_unique<CJContext>(chainman.ActiveChainstate (), *node.connman , *node.mempool , *::masternodeSync , !ignores_incoming_txs);
2222
+ node.cj_ctx = std::make_unique<CJContext>(chainman.ActiveChainstate (), *node.connman , *node.mempool , *node. mn_sync , !ignores_incoming_txs);
2223
2223
2224
2224
#ifdef ENABLE_WALLET
2225
2225
node.coinjoin_loader = interfaces::MakeCoinJoinLoader (*node.cj_ctx ->walletman );
@@ -2231,7 +2231,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
2231
2231
bool fLoadCacheFiles = !(fReindex || fReindexChainState ) && (::ChainActive ().Tip () != nullptr );
2232
2232
2233
2233
if (!fDisableGovernance ) {
2234
- if (!::governance ->LoadCache (fLoadCacheFiles )) {
2234
+ if (!node. govman ->LoadCache (fLoadCacheFiles )) {
2235
2235
auto file_path = (GetDataDir () / " governance.dat" ).string ();
2236
2236
if (fLoadCacheFiles && !fDisableGovernance ) {
2237
2237
return InitError (strprintf (_ (" Failed to load governance cache from %s" ), file_path));
@@ -2247,7 +2247,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
2247
2247
assert (!::mmetaman);
2248
2248
::mmetaman = std::make_unique<CMasternodeMetaMan>(fLoadCacheFiles );
2249
2249
node.mn_metaman = ::mmetaman.get ();
2250
- if (!::mmetaman ->IsValid ()) {
2250
+ if (!node. mn_metaman ->IsValid ()) {
2251
2251
auto file_path = (GetDataDir () / " mncache.dat" ).string ();
2252
2252
if (fLoadCacheFiles ) {
2253
2253
return InitError (strprintf (_ (" Failed to load masternode cache from %s" ), file_path));
@@ -2258,7 +2258,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
2258
2258
assert (!::netfulfilledman);
2259
2259
::netfulfilledman = std::make_unique<CNetFulfilledRequestManager>(fLoadCacheFiles );
2260
2260
node.netfulfilledman = ::netfulfilledman.get ();
2261
- if (!:: netfulfilledman->IsValid ()) {
2261
+ if (!node. netfulfilledman ->IsValid ()) {
2262
2262
auto file_path = (GetDataDir () / " netfulfilled.dat" ).string ();
2263
2263
if (fLoadCacheFiles ) {
2264
2264
return InitError (strprintf (_ (" Failed to load fulfilled requests cache from %s" ), file_path));
@@ -2329,13 +2329,13 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
2329
2329
2330
2330
// ********************************************************* Step 10a: schedule Dash-specific tasks
2331
2331
2332
- node.scheduler ->scheduleEvery (std::bind (&CNetFulfilledRequestManager::DoMaintenance, std::ref (*netfulfilledman)), std::chrono::minutes{1 });
2333
- node.scheduler ->scheduleEvery (std::bind (&CMasternodeSync::DoMaintenance, std::ref (*::masternodeSync )), std::chrono::seconds{1 });
2334
- node.scheduler ->scheduleEvery (std::bind (&CMasternodeUtils::DoMaintenance, std::ref (*node.connman ), std::ref (*::masternodeSync ), std::ref (*node.cj_ctx )), std::chrono::minutes{1 });
2335
- node.scheduler ->scheduleEvery (std::bind (&CDeterministicMNManager::DoMaintenance, std::ref (*deterministicMNManager )), std::chrono::seconds{10 });
2332
+ node.scheduler ->scheduleEvery (std::bind (&CNetFulfilledRequestManager::DoMaintenance, std::ref (*node. netfulfilledman )), std::chrono::minutes{1 });
2333
+ node.scheduler ->scheduleEvery (std::bind (&CMasternodeSync::DoMaintenance, std::ref (*node. mn_sync )), std::chrono::seconds{1 });
2334
+ node.scheduler ->scheduleEvery (std::bind (&CMasternodeUtils::DoMaintenance, std::ref (*node.connman ), std::ref (*node. mn_sync ), std::ref (*node.cj_ctx )), std::chrono::minutes{1 });
2335
+ node.scheduler ->scheduleEvery (std::bind (&CDeterministicMNManager::DoMaintenance, std::ref (*node. dmnman )), std::chrono::seconds{10 });
2336
2336
2337
2337
if (!fDisableGovernance ) {
2338
- node.scheduler ->scheduleEvery (std::bind (&CGovernanceManager::DoMaintenance, std::ref (*::governance ), std::ref (*node.connman )), std::chrono::minutes{5 });
2338
+ node.scheduler ->scheduleEvery (std::bind (&CGovernanceManager::DoMaintenance, std::ref (*node. govman ), std::ref (*node.connman )), std::chrono::minutes{5 });
2339
2339
}
2340
2340
2341
2341
if (fMasternodeMode ) {
0 commit comments