diff --git a/core/node/libp2p/routing.go b/core/node/libp2p/routing.go index 254ab8cfe618..c035e233fb52 100644 --- a/core/node/libp2p/routing.go +++ b/core/node/libp2p/routing.go @@ -185,6 +185,11 @@ func PubsubRouter(mctx helpers.MetricsCtx, lc fx.Lifecycle, in p2pPSRoutingIn) ( func AutoRelayFeeder(lc fx.Lifecycle, h host.Host, peerChan chan peer.AddrInfo, dht *ddht.DHT) { ctx, cancel := context.WithCancel(context.Background()) + // TODO: refactor AutoRelayFeeder, for now we skip it if dht missing to fix sharness panics + if dht == nil { + return + } + done := make(chan struct{}) go func() { defer close(done) diff --git a/test/sharness/.gitignore b/test/sharness/.gitignore index 06ceccc75678..c7ab08146c50 100644 --- a/test/sharness/.gitignore +++ b/test/sharness/.gitignore @@ -2,3 +2,4 @@ lib/sharness/ test-results/ trash directory.*.sh/ plugins +*.DS_Store diff --git a/test/sharness/t0160-resolve.sh b/test/sharness/t0160-resolve.sh index 600e4c07bbac..4b967704946e 100755 --- a/test/sharness/t0160-resolve.sh +++ b/test/sharness/t0160-resolve.sh @@ -125,7 +125,7 @@ test_resolve_cmd_b32() { local self_hash_b32libp2pkey=$(echo $self_hash | ipfs cid format -v 1 -b b --codec libp2p-key) test_expect_success "resolve of /ipns/{cidv1} with multicodec other than libp2p-key returns a meaningful error" ' test_expect_code 1 ipfs resolve /ipns/$self_hash_b32protobuf 2>cidcodec_error && - grep "Error: peer ID represented as CIDv1 require libp2p-key multicodec: retry with /ipns/$self_hash_b32libp2pkey" cidcodec_error + test_should_contain "Error: peer ID represented as CIDv1 require libp2p-key multicodec: retry with /ipns/$self_hash_b32libp2pkey" cidcodec_error ' }