forked from ipfs/boxo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ipfs/go-blockservice#75 from ipfs/fix-staticcheck
fix staticcheck This commit was moved from ipfs/go-blockservice@b22a868
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |