fix: pass SelfConnectionUris to NewHandshakeDoneRequest

This commit is contained in:
Derrick Hammer 2024-01-10 09:37:27 -05:00
parent 7ab602ce23
commit ac11da28c0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 2 deletions

View File

@ -9,7 +9,6 @@ import (
"git.lumeweb.com/LumeWeb/libs5-go/protocol/signed" "git.lumeweb.com/LumeWeb/libs5-go/protocol/signed"
"git.lumeweb.com/LumeWeb/libs5-go/types" "git.lumeweb.com/LumeWeb/libs5-go/types"
"github.com/vmihailenco/msgpack/v5" "github.com/vmihailenco/msgpack/v5"
"net/url"
) )
var _ base.IncomingMessageTyped = (*HandshakeOpen)(nil) var _ base.IncomingMessageTyped = (*HandshakeOpen)(nil)
@ -101,7 +100,7 @@ func (h *HandshakeOpen) HandleMessage(node interfaces.Node, peer net.Peer, verif
return fmt.Errorf("Peer is in different network: %s", h.networkId) return fmt.Errorf("Peer is in different network: %s", h.networkId)
} }
handshake := signed.NewHandshakeDoneRequest(h.handshake, types.SupportedFeatures, []*url.URL{}) handshake := signed.NewHandshakeDoneRequest(h.handshake, types.SupportedFeatures, node.Services().P2P().SelfConnectionUris())
message, err := msgpack.Marshal(handshake) message, err := msgpack.Marshal(handshake)
if err != nil { if err != nil {