Commit cb2398d0 authored by Brian Tiger Chow's avatar Brian Tiger Chow

refactor(mockrouting) misc

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 5cf1ea2d
...@@ -5,14 +5,14 @@ import ( ...@@ -5,14 +5,14 @@ import (
bitswap "github.com/jbenet/go-ipfs/exchange/bitswap" bitswap "github.com/jbenet/go-ipfs/exchange/bitswap"
tn "github.com/jbenet/go-ipfs/exchange/bitswap/testnet" tn "github.com/jbenet/go-ipfs/exchange/bitswap/testnet"
mock "github.com/jbenet/go-ipfs/routing/mock" mockrouting "github.com/jbenet/go-ipfs/routing/mock"
delay "github.com/jbenet/go-ipfs/util/delay" delay "github.com/jbenet/go-ipfs/util/delay"
) )
// Mocks returns |n| connected mock Blockservices // Mocks returns |n| connected mock Blockservices
func Mocks(t *testing.T, n int) []*BlockService { func Mocks(t *testing.T, n int) []*BlockService {
net := tn.VirtualNetwork(delay.Fixed(0)) net := tn.VirtualNetwork(delay.Fixed(0))
rs := mock.VirtualRoutingServer() rs := mockrouting.NewServer()
sg := bitswap.NewSessionGenerator(net, rs) sg := bitswap.NewSessionGenerator(net, rs)
instances := sg.Instances(n) instances := sg.Instances(n)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment