From b36f743402ec047f97ed28bb7ba64cfbe485cb40 Mon Sep 17 00:00:00 2001 From: furszy Date: Fri, 12 Jun 2020 22:56:08 -0300 Subject: [PATCH] Fix masternode service lookup --- src/activemasternode.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index 9e2b13f515524..351056d8beb48 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -67,7 +67,10 @@ void CActiveMasternode::ManageStatus() return; } } else { - service = LookupNumeric(strMasterNodeAddr.c_str(), GetListenPort()); + int nPort; + std::string strHost; + SplitHostPort(strMasterNodeAddr, nPort, strHost); + service = LookupNumeric(strHost.c_str(), nPort); } // The service needs the correct default port to work properly