Merge pull request #237 from UdjinM6/v0.11.2.x_9999_mainnet_only
V0.11.2.x allow port 9999 for MNs on mainnet only
This commit is contained in:
commit
3fdb01087d
@ -49,6 +49,11 @@ void CActiveMasternode::ManageStatus()
|
||||
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
|
||||
return;
|
||||
}
|
||||
} else if(service.GetPort() == 9999) {
|
||||
notCapableReason = "Invalid port: " + boost::lexical_cast<string>(service.GetPort()) + " - 9999 is only supported on mainnet.";
|
||||
status = MASTERNODE_NOT_CAPABLE;
|
||||
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if(Params().NetworkID() == CChainParams::MAIN){
|
||||
|
@ -29,11 +29,18 @@ bool CMasternodeConfig::read(std::string& strErr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* if(CService(ip).GetPort() != 19999 && CService(ip).GetPort() != 9999) {
|
||||
strErr = "Invalid port (must be 9999 for mainnet or 19999 for testnet) detected in masternode.conf: " + line;
|
||||
if(Params().NetworkID() == CChainParams::MAIN){
|
||||
if(CService(ip).GetPort() != 9999) {
|
||||
strErr = "Invalid port detected in masternode.conf: " + line + " (must be 9999 for mainnet)";
|
||||
streamConfig.close();
|
||||
return false;
|
||||
}
|
||||
} else if(CService(ip).GetPort() == 9999) {
|
||||
strErr = "Invalid port detected in masternode.conf: " + line + " (9999 must be only on mainnet)";
|
||||
streamConfig.close();
|
||||
return false;
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
add(alias, ip, privKey, txHash, outputIndex);
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
||||
|
||||
if(Params().NetworkID() == CChainParams::MAIN){
|
||||
if(addr.GetPort() != 9999) return;
|
||||
}
|
||||
} else if(addr.GetPort() == 9999) return;
|
||||
|
||||
//search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
|
||||
CMasternode* pmn = this->Find(vin);
|
||||
|
Loading…
Reference in New Issue
Block a user