diff options
| author | Jeff Garzik <[email protected]> | 2012-08-28 17:43:38 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-08-28 17:43:38 -0700 |
| commit | 5f388758071967be35bd04e016e862c0536552a9 (patch) | |
| tree | 00f44ee6ace64d8e64f83320e90c5760d0a45fab /src/net.cpp | |
| parent | Small update to release notes regarding -seednode (diff) | |
| parent | Bugfix: increase score, not port (diff) | |
| download | discoin-5f388758071967be35bd04e016e862c0536552a9.tar.xz discoin-5f388758071967be35bd04e016e862c0536552a9.zip | |
Merge pull request #1748 from sipa/bugfix_portinc
Bugfix: increase score, not port
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index aaf7883e5..dc55fae5c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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()); } |