diff options
author | Carl Dong <accounts@carldong.me> | 2019-02-04 13:12:20 -0500 |
---|---|---|
committer | Carl Dong <accounts@carldong.me> | 2019-02-04 13:12:20 -0500 |
commit | 107623c26c2113428446effaa24edb986a3e780c (patch) | |
tree | b05ea26d92af143ca950e0d905c420efdd85692a /src | |
parent | cf8aa5c76ad84f1d81022afb422fdfef954c129c (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index be249b4466..bc9480cf70 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; } |