mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Force txindex when a Mastenode
This commit is contained in:
parent
e65a1edce3
commit
3c8b335594
@ -1457,6 +1457,12 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
|
||||
|
||||
fMasterNode = GetBoolArg("-masternode", false);
|
||||
|
||||
if((fMasterNode || masternodeConfig.getCount() > -1) && fTxIndex == false) {
|
||||
return InitError("Enabling Masternode support requires turning on transaction indexing."
|
||||
"Please add txindex=1 to your configuration and start with --reindex=1");
|
||||
}
|
||||
|
||||
if(fMasterNode) {
|
||||
LogPrintf("IS DARKSEND MASTER NODE\n");
|
||||
strMasterNodeAddr = GetArg("-masternodeaddr", "");
|
||||
|
@ -91,6 +91,14 @@ public:
|
||||
return entries;
|
||||
}
|
||||
|
||||
int getCount() {
|
||||
int c = -1;
|
||||
BOOST_FOREACH(CMasternodeEntry e, entries) {
|
||||
if(e.getAlias() != "") c++;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<CMasternodeEntry> entries;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user