aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-08-29 02:33:25 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-08-29 02:33:25 +0200
commitaf4da4be3d52b1829e516fd16898c05903c41f93 (patch)
tree00f44ee6ace64d8e64f83320e90c5760d0a45fab
parent3588c91c7ed72f071637ff5fd25ee3ad6ed06ca5 (diff)
downloadbitcoin-af4da4be3d52b1829e516fd16898c05903c41f93.tar.xz
Bugfix: increase score, not port
-rw-r--r--src/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index aaf7883e51..dc55fae5c5 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());
}