From af4da4be3d52b1829e516fd16898c05903c41f93 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 29 Aug 2012 02:33:25 +0200 Subject: [PATCH] Bugfix: increase score, not port --- src/net.cpp | 4 ++-- 1 file 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()); }