mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
p2p: always set nTime for self-advertisements
If we self-advertised to an inbound peer with the address they gave us, nTime was left default-initialized, so that our peer wouldn't relay it any further along.
This commit is contained in:
parent
455780b1ae
commit
99b9e5f3a9
2 changed files with 6 additions and 3 deletions
|
|
@ -250,7 +250,7 @@ std::optional<CAddress> GetLocalAddrForPeer(CNode *pnode)
|
|||
if (pnode->IsInboundConn()) {
|
||||
// For inbound connections, assume both the address and the port
|
||||
// as seen from the peer.
|
||||
addrLocal = CAddress{pnode->GetAddrLocal(), addrLocal.nServices};
|
||||
addrLocal = CAddress{pnode->GetAddrLocal(), addrLocal.nServices, addrLocal.nTime};
|
||||
} else {
|
||||
// For outbound connections, assume just the address as seen from
|
||||
// the peer and leave the port in `addrLocal` as returned by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue