From 107623c26c2113428446effaa24edb986a3e780c Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Mon, 4 Feb 2019 13:12:20 -0500 Subject: [PATCH] net: Correct comparison of addr count LOCAL_NONE is supposed to be an enum indicating the score of a LocalServiceInfo rather than the count of an addr in mapLocalHost. --- src/net.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index be249b446..bc9480cf7 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -174,8 +174,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices) static int GetnScore(const CService& addr) { LOCK(cs_mapLocalHost); - if (mapLocalHost.count(addr) == LOCAL_NONE) - return 0; + if (mapLocalHost.count(addr) == 0) return 0; return mapLocalHost[addr].nScore; }