CMasternodeConfig::read shouldn't spam into debug.log, instead AppInit2 should print current masternode.conf location. Processing masternode.conf to lock inputs should also be performed only when current node is not a masternode. (#1046)

This commit is contained in:
UdjinM6 2016-09-30 00:28:33 +04:00 committed by GitHub
parent 64ba0dc6d0
commit 4316b4e277
2 changed files with 18 additions and 18 deletions

View File

@ -1800,7 +1800,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
} else {
return InitError(_("You must specify a masternodeprivkey in the configuration. Please see documentation for help."));
}
}
} else {
LogPrintf("Using masternode config file %s\n", GetMasternodeConfigFile().string());
if(GetBoolArg("-mnconflock", true) && pwalletMain) {
LOCK(pwalletMain->cs_wallet);
@ -1820,6 +1821,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
LogPrintf(" %s %s - locked successfully\n", mne.getTxHash(), mne.getOutputIndex());
}
}
}
nLiquidityProvider = GetArg("-liquidityprovider", nLiquidityProvider);
nLiquidityProvider = std::min(std::max(nLiquidityProvider, 0), 100);

View File

@ -20,8 +20,6 @@ bool CMasternodeConfig::read(std::string& strErr) {
boost::filesystem::path pathMasternodeConfigFile = GetMasternodeConfigFile();
boost::filesystem::ifstream streamConfig(pathMasternodeConfigFile);
LogPrintf("loading masternode file at %s\n", pathMasternodeConfigFile.string());
if (!streamConfig.good()) {
FILE* configFile = fopen(pathMasternodeConfigFile.string().c_str(), "a");
if (configFile != NULL) {