Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "util.h"
#include "activemasternode.h"
#include "masternodeman.h"
#include "masternodeconfig.h"
#include "spork.h"
#ifdef ENABLE_WALLET
#include "db.h"
Expand Down Expand Up @@ -342,6 +343,7 @@ std::string HelpMessage(HelpMessageMode hmm)
strUsage += "\n" + _("Masternode options:") + "\n";
strUsage += " -masternode=<n> " + _("Enable the client to act as a masternode (0-1, default: 0)") + "\n";
strUsage += " -mnconf=<file> " + _("Specify masternode configuration file (default: masternode.conf)") + "\n";
strUsage += " -mnconflock=<n> " + _("Lock masternodes from masternode configuration file (default: 1)") + "\n";
strUsage += " -masternodeprivkey=<n> " + _("Set the masternode private key") + "\n";
strUsage += " -masternodeaddr=<n> " + _("Set external address:port to get to this masternode (example: address:port)") + "\n";
strUsage += " -masternodeminprotocol=<n> " + _("Ignore masternodes less than version (example: 70050; default : 0)") + "\n";
Expand Down Expand Up @@ -1271,6 +1273,17 @@ bool AppInit2(boost::thread_group& threadGroup)
}
}

if(GetBoolArg("-mnconflock", true)) {
LogPrintf("Locking Masternodes:\n");
uint256 mnTxHash;
BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
LogPrintf(" %s %s\n", mne.getTxHash(), mne.getOutputIndex());
mnTxHash.SetHex(mne.getTxHash());
COutPoint outpoint = COutPoint(mnTxHash, boost::lexical_cast<unsigned int>(mne.getOutputIndex()));
pwalletMain->LockCoin(outpoint);
}
}

fEnableDarksend = GetBoolArg("-enabledarksend", false);

nDarksendRounds = GetArg("-darksendrounds", 2);
Expand Down