Commit 95296cf8 authored by squbs's avatar squbs

testnet masternode.conf port bug fix

parent a2dd4de5
......@@ -368,6 +368,7 @@ Swap
[0.0] SUUTsZhb7cpXNgZbieKFrE8gocAtL7EK1C
[0.1] SPkVa5cB1kcgJk5rinL3p9w47qnjpej5gm
[0.2] SPFTqzvx63YGt6U5GJ2WpbmsatTtZ8gsZr
[0.3] SiUHsUD7BcHBwry2kZbQrm6YS7XkG8BvGG
Developers
......
......@@ -51,19 +51,22 @@ bool CMasternodeConfig::read(std::string& strErr) {
return false;
}
}
int port = 0;
std::string hostname = "";
SplitHostPort(ip, port, hostname);
if(port != 7575) {
strErr = "Invalid port detected in masternode.conf: " + line + " (must be 7575 for mainnet)";
streamConfig.close();
return false;
}
if(port != 7575 && Params().NetworkIDString() == CBaseChainParams::MAIN) {
strErr = "Invalid port detected in masternode.conf: " + line + " (must be 7575 for mainnet)";
streamConfig.close();
return false;
}
else if(port != 7565 && Params().NetworkIDString() == CBaseChainParams::TESTNET) {
strErr = "Invalid port detected in masternode.conf: " + line + " (must be 7565 for testnet)";
streamConfig.close();
return false;
}
add(alias, ip, privKey, txHash, outputIndex, donationAddress, donationPercent);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment