mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +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);
|
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) {
|
if(fMasterNode) {
|
||||||
LogPrintf("IS DARKSEND MASTER NODE\n");
|
LogPrintf("IS DARKSEND MASTER NODE\n");
|
||||||
strMasterNodeAddr = GetArg("-masternodeaddr", "");
|
strMasterNodeAddr = GetArg("-masternodeaddr", "");
|
||||||
|
@ -91,6 +91,14 @@ public:
|
|||||||
return entries;
|
return entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getCount() {
|
||||||
|
int c = -1;
|
||||||
|
BOOST_FOREACH(CMasternodeEntry e, entries) {
|
||||||
|
if(e.getAlias() != "") c++;
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<CMasternodeEntry> entries;
|
std::vector<CMasternodeEntry> entries;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user