Browse Source

Bugfix: increase score, not port

miguelfreitas
Pieter Wuille 12 years ago
parent
commit
af4da4be3d
  1. 4
      src/net.cpp

4
src/net.cpp

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

Loading…
Cancel
Save