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.
This commit is contained in:
parent
cf8aa5c76a
commit
107623c26c
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue