Merge pull request #1748 from sipa/bugfix_portinc

Bugfix: increase score, not port
This commit is contained in:
Jeff Garzik 2012-08-28 17:43:38 -07:00
commit 5f38875807
1 changed files with 2 additions and 2 deletions

View File

@ -233,8 +233,8 @@ bool AddLocal(const CService& addr, int nScore)
bool fAlready = mapLocalHost.count(addr) > 0;
LocalServiceInfo &info = mapLocalHost[addr];
if (!fAlready || nScore >= info.nScore) {
info.nScore = nScore;
info.nPort = addr.GetPort() + (fAlready ? 1 : 0);
info.nScore = nScore + (fAlready ? 1 : 0);
info.nPort = addr.GetPort();
}
SetReachable(addr.GetNetwork());
}