mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
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
Add a link
Reference in a new issue