Skip to content

Commit 5fefef4

Browse files
committed
cr fixes
1 parent 7e5cc08 commit 5fefef4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

network/hybridNetwork.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ func NewHybridP2PNetwork(log logging.Logger, cfg config.Local, datadir string, p
5151

5252
var childNetMeshCreator MeshCreator = meshCreator
5353
var hybridMeshCreator MeshCreator = &noopMeshCreator{}
54-
_, isHybridMeshCreator := meshCreator.(*hybridRelayMeshCreator)
54+
_, isHybridMeshCreator := meshCreator.(hybridRelayMeshCreator)
5555
if meshCreator == nil && cfg.IsHybridServer() || isHybridMeshCreator {
5656
// no mesh creator provided and this node is a listening/relaying node
5757
// then override and use hybrid relay meshing
5858
// or, if a hybrid relay meshing requested explicitly, do the same
5959
childNetMeshCreator = &noopMeshCreator{}
60-
hybridMeshCreator = &hybridRelayMeshCreator{}
60+
hybridMeshCreator = hybridRelayMeshCreator{}
6161
}
6262

6363
p2pnet, err := NewP2PNetwork(log, p2pcfg, datadir, phonebookAddresses, genesisInfo, nodeInfo, &identityOpts{tracker: identityTracker}, childNetMeshCreator)

network/mesh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ type MeshCreator interface {
192192
// run a mesh thread that periodically checks for new peers.
193193
type baseMeshCreator struct{}
194194

195-
func (c *baseMeshCreator) create(opts ...meshOption) (mesher, error) {
195+
func (c baseMeshCreator) create(opts ...meshOption) (mesher, error) {
196196
return newBaseMesher(opts...)
197197
}
198198

199199
// hybridRelayMeshCreator is a creator for the hybrid relay mesh strategy used in hybrid relays:
200200
// always use wsnet nodes
201201
type hybridRelayMeshCreator struct{}
202202

203-
func (c *hybridRelayMeshCreator) create(opts ...meshOption) (mesher, error) {
203+
func (c hybridRelayMeshCreator) create(opts ...meshOption) (mesher, error) {
204204
var cfg meshConfig
205205
for _, opt := range opts {
206206
opt(&cfg)

network/p2pNetwork.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func (n *P2PNetwork) setup() error {
352352
n.meshUpdateRequests = make(chan meshRequest, 5)
353353
meshCreator := n.meshCreator
354354
if meshCreator == nil {
355-
meshCreator = &baseMeshCreator{}
355+
meshCreator = baseMeshCreator{}
356356
}
357357
var err error
358358
n.mesher, err = meshCreator.create(

network/wsNetwork.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ func (wn *WebsocketNetwork) setup() error {
599599
wn.meshUpdateRequests = make(chan meshRequest, 5)
600600
meshCreator := wn.meshCreator
601601
if meshCreator == nil {
602-
meshCreator = &baseMeshCreator{}
602+
meshCreator = baseMeshCreator{}
603603
}
604604
var err error
605605
wn.mesher, err = meshCreator.create(

0 commit comments

Comments
 (0)