mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-28 15:34:14 +00:00
Merge pull request #1748 from sipa/bugfix_portinc
Bugfix: increase score, not port
This commit is contained in:
commit
5f38875807
@ -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…
x
Reference in New Issue
Block a user