Skip to content

Commit 107623c

Browse files
committed
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.
1 parent cf8aa5c commit 107623c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/net.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
174174
static int GetnScore(const CService& addr)
175175
{
176176
LOCK(cs_mapLocalHost);
177-
if (mapLocalHost.count(addr) == LOCAL_NONE)
178-
return 0;
177+
if (mapLocalHost.count(addr) == 0) return 0;
179178
return mapLocalHost[addr].nScore;
180179
}
181180

0 commit comments

Comments
 (0)