message: [Bug] Fix CMasternodeConfig::read
  rebase from upstream. Windows doesn't initialize CService properly
  during startup before the masternode.conf file is read.
diff: // Distributed under the MIT/X11 software license, see the accompanying
  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  -// clang-format off
  -#include "net.h"
  +#include "netbase.h"
  #include "masternodeconfig.h"
  #include "util.h"
  #include "ui_interface.h"
  #include <base58.h>
  -// clang-format on
  CMasternodeConfig masternodeConfig;
  @@ -60,15 +58,25 @@ bool CMasternodeConfig::read(std::string& strErr)
  }
  }
  + int port = 0;
  + std::string hostname = "";
  + SplitHostPort(ip, port, hostname);
  + if(port == 0 || hostname == "") {
  + strErr = _("Failed to parse host:port string") + "\n"+
  + strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"";
  + streamConfig.close();
  + return false;
  + }
  +
  if (Params().NetworkID() == CBaseChainParams::MAIN) {
  - if (CService(ip).GetPort() != 51472) {
  + if (port != 51472) {
  strErr = _("Invalid port detected in masternode.conf") + "\n" +
  strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
  _("(must be 51472 for mainnet)");
  streamConfig.close();
  return false;
  }
  - } else if (CService(ip).GetPort() == 51472) {
  + } else if (port == 51472) {
  strErr = _("Invalid port detected in masternode.conf") + "\n" +
  strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
  _("(51472 could be used only on mainnet)");
  