Skip to content

Commit bfbe425

Browse files
committed
Merge #15345: net: Correct comparison of addr count
107623c net: Correct comparison of addr count (Carl Dong) Pull request description: `LOCAL_NONE` is supposed to be an enum indicating the `nScore` of a `LocalServiceInfo` rather than the count of an addr in `mapLocalHost`. Tree-SHA512: a47a0859dd11c991d75b54e96b08c502e3d235f7a6522a2355053f377d05e7853483996919292f458d917a561b23951e6945d6bf0ff5a2f29513c477c640bdd2
2 parents 76deb30 + 107623c commit bfbe425

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)