From caf139775c4441fd0b5a5ce2b63752194c92e33d Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:09:25 +0200 Subject: [PATCH] fix: enable hole punching for test host --- daemon.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon.go b/daemon.go index 55c1236..ea2abf8 100644 --- a/daemon.go +++ b/daemon.go @@ -87,7 +87,10 @@ func newDaemon(ctx context.Context, acceleratedDHT bool) (*daemon, error) { } return &daemon{h: h, dht: d, dhtMessenger: pm, createTestHost: func() (host.Host, error) { - return libp2p.New(libp2p.ConnectionGater(&privateAddrFilterConnectionGater{})) + return libp2p.New( + libp2p.ConnectionGater(&privateAddrFilterConnectionGater{}), + libp2p.EnableHolePunching(), + ) }}, nil }