mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #15345: net: Correct comparison of addr count
107623c26c2113428446effaa24edb986a3e780c 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
This commit is contained in:
parent
6e66592ba7
commit
ae6ce01be6
@ -198,8 +198,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
|
|||||||
static int GetnScore(const CService& addr)
|
static int GetnScore(const CService& addr)
|
||||||
{
|
{
|
||||||
LOCK(cs_mapLocalHost);
|
LOCK(cs_mapLocalHost);
|
||||||
if (mapLocalHost.count(addr) == LOCAL_NONE)
|
if (mapLocalHost.count(addr) == 0) return 0;
|
||||||
return 0;
|
|
||||||
return mapLocalHost[addr].nScore;
|
return mapLocalHost[addr].nScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user