Skip to content

Commit

Permalink
init: better MN collateral output lock logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Feb 27, 2021
1 parent 2a64a2a commit de6f052
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1858,18 +1858,19 @@ bool AppInitMain()
#ifdef ENABLE_WALLET
if (gArgs.GetBoolArg("-mnconflock", DEFAULT_MNCONFLOCK) && pwalletMain) {
LOCK(pwalletMain->cs_wallet);
LogPrintf("Locking Masternodes:\n");
LogPrintf("Locking Masternodes collateral utxo:\n");
uint256 mnTxHash;
for (const CMasternodeConfig::CMasternodeEntry& mne : masternodeConfig.getEntries()) {
LogPrintf(" %s %s\n", mne.getTxHash(), mne.getOutputIndex());
for (const auto& mne : masternodeConfig.getEntries()) {
mnTxHash.SetHex(mne.getTxHash());
COutPoint outpoint = COutPoint(mnTxHash, (unsigned int) std::stoul(mne.getOutputIndex()));
pwalletMain->LockCoin(outpoint);
LogPrintf("Locked collateral, MN: %s, tx hash: %s, output index: %s\n",
mne.getAlias(), mne.getTxHash(), mne.getOutputIndex());
}
}
#endif

//lite mode disables all Masternode related functionality
// lite mode disables all Masternode related functionality
fLiteMode = gArgs.GetBoolArg("-litemode", false);
if (fMasterNode && fLiteMode) {
return UIError("You can not start a masternode in litemode");
Expand Down

0 comments on commit de6f052

Please sign in to comment.