chore: bump go-waku
Includes support for dns4 multiaddresses
This commit is contained in:
parent
df92cdbaf8
commit
a0210ac281
2
go.mod
2
go.mod
|
@ -51,7 +51,7 @@ require (
|
|||
github.com/russolsen/same v0.0.0-20160222130632-f089df61f51d // indirect
|
||||
github.com/russolsen/transit v0.0.0-20180705123435-0794b4c4505a
|
||||
github.com/status-im/doubleratchet v3.0.0+incompatible
|
||||
github.com/status-im/go-waku v0.0.0-20220302160213-b820d797c85b
|
||||
github.com/status-im/go-waku v0.0.0-20220303160403-f4f307db8734
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20211018070416-a93f3b70c432
|
||||
github.com/status-im/markdown v0.0.0-20210405121740-32e5a5055fb6
|
||||
github.com/status-im/migrate/v4 v4.6.2-status.2
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1214,8 +1214,8 @@ github.com/status-im/go-ethereum v1.10.4-status.3 h1:RF618iSCvqJtXu3ZSg7XNg6MJaS
|
|||
github.com/status-im/go-ethereum v1.10.4-status.3/go.mod h1:GvIhpdCOgMHI6i5xVPEZOrv/qSMeOFHbZh77AoyZUoE=
|
||||
github.com/status-im/go-multiaddr-ethv4 v1.2.1 h1:09v9n6426NAojNOvdgegqrAotgffWW/UPDwrpJ85DNE=
|
||||
github.com/status-im/go-multiaddr-ethv4 v1.2.1/go.mod h1:SlBebvQcSUM5+/R/YfpfMuu5WyraW47XFmIqLYBmlKU=
|
||||
github.com/status-im/go-waku v0.0.0-20220302160213-b820d797c85b h1:PcN3ahtAmF5kZ8TsQNHHb3HBQIyk0qKsN8XYHhoEM10=
|
||||
github.com/status-im/go-waku v0.0.0-20220302160213-b820d797c85b/go.mod h1:7SH3xYPUpUwiwSkSSuqPoJQo01ulLD5hSFDvGZzjsvo=
|
||||
github.com/status-im/go-waku v0.0.0-20220303160403-f4f307db8734 h1:uyBsGFFH63+SHerRGKRrlWVYI8XFm3PoP4v2ma4RFIs=
|
||||
github.com/status-im/go-waku v0.0.0-20220303160403-f4f307db8734/go.mod h1:7SH3xYPUpUwiwSkSSuqPoJQo01ulLD5hSFDvGZzjsvo=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20211018070416-a93f3b70c432 h1:cbNFU38iimo9fY4B7CdF/fvIF6tNPJIZjBbpfmW2EY4=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20211018070416-a93f3b70c432/go.mod h1:A8t3i0CUGtXCA0aiLsP7iyikmk/KaD/2XVvNJqGCU20=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
|
|
|
@ -149,6 +149,12 @@ func (wf *WakuFilter) onRequest(s network.Stream) {
|
|||
func (wf *WakuFilter) pushMessage(subscriber Subscriber, msg *pb.WakuMessage) error {
|
||||
pushRPC := &pb.FilterRPC{RequestId: subscriber.requestId, Push: &pb.MessagePush{Messages: []*pb.WakuMessage{msg}}}
|
||||
|
||||
// We connect first so dns4 addresses are resolved (NewStream does not do it)
|
||||
err := wf.h.Connect(wf.ctx, wf.h.Peerstore().PeerInfo(subscriber.peer))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
conn, err := wf.h.NewStream(wf.ctx, subscriber.peer, FilterID_v20beta1)
|
||||
if err != nil {
|
||||
wf.subscribers.FlagAsFailure(subscriber.peer)
|
||||
|
@ -233,6 +239,12 @@ func (wf *WakuFilter) requestSubscription(ctx context.Context, filter ContentFil
|
|||
contentFilters = append(contentFilters, &pb.FilterRequest_ContentFilter{ContentTopic: ct})
|
||||
}
|
||||
|
||||
// We connect first so dns4 addresses are resolved (NewStream does not do it)
|
||||
err = wf.h.Connect(ctx, wf.h.Peerstore().PeerInfo(params.selectedPeer))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
request := pb.FilterRequest{
|
||||
Subscribe: true,
|
||||
Topic: filter.Topic,
|
||||
|
@ -267,8 +279,13 @@ func (wf *WakuFilter) requestSubscription(ctx context.Context, filter ContentFil
|
|||
}
|
||||
|
||||
func (wf *WakuFilter) Unsubscribe(ctx context.Context, contentFilter ContentFilter, peer peer.ID) error {
|
||||
conn, err := wf.h.NewStream(ctx, peer, FilterID_v20beta1)
|
||||
// We connect first so dns4 addresses are resolved (NewStream does not do it)
|
||||
err := wf.h.Connect(ctx, wf.h.Peerstore().PeerInfo(peer))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
conn, err := wf.h.NewStream(ctx, peer, FilterID_v20beta1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
6
vendor/github.com/status-im/go-waku/waku/v2/protocol/lightpush/waku_lightpush.go
generated
vendored
6
vendor/github.com/status-im/go-waku/waku/v2/protocol/lightpush/waku_lightpush.go
generated
vendored
|
@ -145,6 +145,12 @@ func (wakuLP *WakuLightPush) request(ctx context.Context, req *pb.PushRequest, o
|
|||
return nil, ErrInvalidId
|
||||
}
|
||||
|
||||
// We connect first so dns4 addresses are resolved (NewStream does not do it)
|
||||
err := wakuLP.h.Connect(ctx, wakuLP.h.Peerstore().PeerInfo(params.selectedPeer))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
connOpt, err := wakuLP.h.NewStream(ctx, params.selectedPeer, LightPushID_v20beta1)
|
||||
if err != nil {
|
||||
wakuLP.log.Info("failed to connect to remote peer", err)
|
||||
|
|
|
@ -523,6 +523,12 @@ func DefaultOptions() []HistoryRequestOption {
|
|||
func (store *WakuStore) queryFrom(ctx context.Context, q *pb.HistoryQuery, selectedPeer peer.ID, requestId []byte) (*pb.HistoryResponse, error) {
|
||||
store.log.Info(fmt.Sprintf("Querying message history with peer %s", selectedPeer))
|
||||
|
||||
// We connect first so dns4 addresses are resolved (NewStream does not do it)
|
||||
err := store.h.Connect(ctx, store.h.Peerstore().PeerInfo(selectedPeer))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
connOpt, err := store.h.NewStream(ctx, selectedPeer, StoreID_v20beta4)
|
||||
if err != nil {
|
||||
store.log.Error("Failed to connect to remote peer", err)
|
||||
|
|
|
@ -453,7 +453,7 @@ github.com/status-im/go-discover/discover/v4wire
|
|||
github.com/status-im/go-discover/discover/v5wire
|
||||
# github.com/status-im/go-multiaddr-ethv4 v1.2.1
|
||||
github.com/status-im/go-multiaddr-ethv4
|
||||
# github.com/status-im/go-waku v0.0.0-20220302160213-b820d797c85b
|
||||
# github.com/status-im/go-waku v0.0.0-20220303160403-f4f307db8734
|
||||
github.com/status-im/go-waku/waku/persistence
|
||||
github.com/status-im/go-waku/waku/try
|
||||
github.com/status-im/go-waku/waku/v2
|
||||
|
|
Loading…
Reference in New Issue