Skip to content

Commit 16236fc

Browse files
committed
fix: linter
1 parent 5ff9c3c commit 16236fc

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

pkg/p2p/libp2p/libp2p.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,9 @@ func New(ctx context.Context, signer beecrypto.Signer, networkID uint64, overlay
358358
case *p2pforge.P2PForgeCertMgr:
359359
cm.ProvideHost(h) // Call func field
360360
case *MockP2PForgeCertMgr:
361-
cm.ProvideHost(h) // Call func field
361+
if err := cm.ProvideHost(h); err != nil {
362+
return nil, fmt.Errorf("failed to provide host to MockP2PForgeCertMgr: %w", err)
363+
}
362364
default:
363365
return nil, fmt.Errorf("unknown cert manager type")
364366
}

pkg/p2p/libp2p/mock_certmagic.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
// Copyright 2025 The Swarm Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
14
package libp2p
25

36
import (
47
"context"
58
"crypto/tls"
6-
"fmt"
79
"sync"
810

911
"github.com/libp2p/go-libp2p/config"
@@ -105,7 +107,6 @@ func (m *MockP2PForgeCertMgr) Start() error {
105107
m.started = true
106108
if m.onCertLoaded != nil {
107109
go func() {
108-
fmt.Println("MockP2PForgeCertMgr: calling onCertLoaded")
109110
m.onCertLoaded()
110111
}()
111112
}

0 commit comments

Comments
 (0)