Skip to content

Commit

Permalink
Merge pull request ipfs/go-blockservice#75 from ipfs/fix-staticcheck
Browse files Browse the repository at this point in the history
fix staticcheck

This commit was moved from ipfs/go-blockservice@b22a868
  • Loading branch information
marten-seemann authored May 16, 2021
2 parents d210966 + f2a8fd4 commit 7b9a566
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions blockservice/test/mock.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
package bstest

import (
. "github.com/ipfs/go-blockservice"

testinstance "github.com/ipfs/go-bitswap/testinstance"
tn "github.com/ipfs/go-bitswap/testnet"
"github.com/ipfs/go-blockservice"
delay "github.com/ipfs/go-ipfs-delay"
mockrouting "github.com/ipfs/go-ipfs-routing/mock"
)

// Mocks returns |n| connected mock Blockservices
func Mocks(n int) []BlockService {
func Mocks(n int) []blockservice.BlockService {
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))
sg := testinstance.NewTestInstanceGenerator(net)

instances := sg.Instances(n)

var servs []BlockService
var servs []blockservice.BlockService
for _, i := range instances {
servs = append(servs, New(i.Blockstore(), i.Exchange))
servs = append(servs, blockservice.New(i.Blockstore(), i.Exchange))
}
return servs
}

0 comments on commit 7b9a566

Please sign in to comment.