Populate services in GetLocalAddress

Previously if we didn't have any local addresses, GetLocalAddress would return
0.0.0.0 and then we'd swap in a peer's notion of our address in AdvertiseLocal,
but then nServices would never get set.

Github-Pull: #10424
Rebased-From: 307013469f
This commit is contained in:
Alex Morcos 2017-05-18 16:57:53 -04:00 committed by Wladimir J. van der Laan
parent ffb0c4b035
commit 37a8fc54d4
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -143,7 +143,7 @@ static std::vector<CAddress> convertSeed6(const std::vector<SeedSpec6> &vSeedsIn
// one by discovery.
CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
{
CAddress ret(CService(CNetAddr(),GetListenPort()), NODE_NONE);
CAddress ret(CService(CNetAddr(),GetListenPort()), nLocalServices);
CService addr;
if (GetLocal(addr, paddrPeer))
{