Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
13 changes: 10 additions & 3 deletions src/masternodeconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/masternodeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down