mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#25814: simplify GetLocalAddress()
This commit is contained in:
parent
6d4945418a
commit
79e67fd96a
@ -238,12 +238,11 @@ static std::vector<CAddress> ConvertSeeds(const std::vector<uint8_t> &vSeedsIn)
|
|||||||
// one by discovery.
|
// one by discovery.
|
||||||
CService GetLocalAddress(const CNetAddr& addrPeer)
|
CService GetLocalAddress(const CNetAddr& addrPeer)
|
||||||
{
|
{
|
||||||
CService ret{CNetAddr(), GetListenPort()};
|
|
||||||
CService addr;
|
CService addr;
|
||||||
if (GetLocal(addr, &addrPeer)) {
|
if (GetLocal(addr, &addrPeer)) {
|
||||||
ret = CService{addr};
|
return addr;
|
||||||
}
|
}
|
||||||
return ret;
|
return CService{CNetAddr(), GetListenPort()};
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetnScore(const CService& addr)
|
static int GetnScore(const CService& addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user