mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
net, refactor: Move AddLocal call one level up
This change simplifies the following commit.
This commit is contained in:
parent
57f17e57c8
commit
92bd3c1da4
1 changed files with 5 additions and 4 deletions
|
|
@ -2211,10 +2211,6 @@ bool CConnman::BindListenPort(const CService& addrBind, bilingual_str& strError,
|
|||
}
|
||||
|
||||
vhListenSocket.push_back(ListenSocket(hListenSocket, permissions));
|
||||
|
||||
if (addrBind.IsRoutable() && fDiscover && (permissions & PF_NOBAN) == 0)
|
||||
AddLocal(addrBind, LOCAL_BIND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -2308,6 +2304,11 @@ bool CConnman::Bind(const CService &addr, unsigned int flags, NetPermissionFlags
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (addr.IsRoutable() && fDiscover && (permissions & PF_NOBAN) == 0) {
|
||||
AddLocal(addr, LOCAL_BIND);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue