fixed regtest+ds issues

This commit is contained in:
Evan Duffield 2015-02-02 11:10:17 -07:00
parent 2992907d91
commit 1f828f45ec

View File

@ -434,9 +434,16 @@ CNode* FindNode(std::string addrName)
CNode* FindNode(const CService& addr)
{
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes)
if(pnode->addr == addr)
return (pnode);
BOOST_FOREACH(CNode* pnode, vNodes){
if(RegTest()){
//if using regtest, just check the IP
if((CNetAddr)pnode->addr == (CNetAddr)addr)
return (pnode);
} else {
if(pnode->addr == addr)
return (pnode);
}
}
return NULL;
}