Skip to content

Commit

Permalink
fix: masternode port check #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Polzer committed Mar 14, 2018
1 parent 8b6f958 commit 5467d4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ bool CActiveMasternode::UpdateSentinelPing(int version)

void CActiveMasternode::ManageStateInitial(CConnman* connman)
{
const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN);
LogPrint(BCLog::MNODE, "CActiveMasternode::ManageStateInitial -- status = %s, type = %s, pinger enabled = %d\n", GetStatus(), GetTypeString(), fPingerEnabled);

// Check that our local network configuration is correct
Expand Down Expand Up @@ -166,7 +167,7 @@ void CActiveMasternode::ManageStateInitial(CConnman* connman)
return;
}

int mainnetDefaultPort = Params().GetDefaultPort();
int mainnetDefaultPort = defaultChainParams->GetDefaultPort();
if(Params().NetworkIDString() == CBaseChainParams::MAIN) {
if(service.GetPort() != mainnetDefaultPort) {
nState = ACTIVE_MASTERNODE_NOT_CAPABLE;
Expand Down

0 comments on commit 5467d4b

Please sign in to comment.