diff --git a/src/net.cpp b/src/net.cpp index abb3ea55e..9648d5d08 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -374,16 +374,9 @@ CNode* FindNode(const std::string& addrName) CNode* FindNode(const CService& addr) { LOCK(cs_vNodes); - BOOST_FOREACH(CNode* pnode, vNodes){ - if(Params().NetworkIDString() == CBaseChainParams::REGTEST){ - //if using regtest, just check the IP - if((CNetAddr)pnode->addr == (CNetAddr)addr) - return (pnode); - } else { - if((CService)pnode->addr == addr) - return (pnode); - } - } + BOOST_FOREACH(CNode* pnode, vNodes) + if((CService)pnode->addr == addr) + return (pnode); return NULL; }