Skip to content

Commit

Permalink
Merge branch 'master' into async-filter-wg
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyaprem authored Sep 3, 2023
2 parents b1acd53 + e8bd38a commit a6a7922
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions waku/v2/node/wakunode2.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,20 @@ func (w *WakuNode) connect(ctx context.Context, info peer.AddrInfo) error {
return err
}

for _, addr := range info.Addrs {
// TODO: this is a temporary fix
// host.Connect adds the addresses with a TempAddressTTL
// however, identify will filter out all non IP addresses
// and expire all temporary addrs. So in the meantime, let's
// store dns4 addresses with a connectedAddressTTL, otherwise
// it will have trouble with the status fleet circuit relay addresses
// See https://github.com/libp2p/go-libp2p/issues/2550
_, err := addr.ValueForProtocol(ma.P_DNS4)
if err == nil {
w.host.Peerstore().AddAddrs(info.ID, info.Addrs, peerstore.ConnectedAddrTTL)
}
}

w.host.Peerstore().(wps.WakuPeerstore).ResetConnFailures(info)

w.metrics.RecordDial()
Expand Down

0 comments on commit a6a7922

Please sign in to comment.