diff options
| author | Carl Dong <[email protected]> | 2019-02-04 13:12:20 -0500 |
|---|---|---|
| committer | Carl Dong <[email protected]> | 2019-02-04 13:12:20 -0500 |
| commit | 107623c26c2113428446effaa24edb986a3e780c (patch) | |
| tree | b05ea26d92af143ca950e0d905c420efdd85692a /src/net.cpp | |
| parent | Merge #15339: qt: Pre-0.18 split-off translations update (diff) | |
| download | discoin-107623c26c2113428446effaa24edb986a3e780c.tar.xz discoin-107623c26c2113428446effaa24edb986a3e780c.zip | |
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/net.cpp')
| -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 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; } |