1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 09:52:20 +08:00

refactor(bitswap) bitswap.Network now abstracts ipfs.Network + ipfs.Routing

@jbenet @whyrusleeping

the next commit will change bitswap.Network.FindProviders to only deal
with IDs
This commit is contained in:
Brian Tiger Chow
2014-12-23 08:16:05 -05:00
committed by Juan Batiz-Benet
parent c6294646e9
commit 27dc9594ba
10 changed files with 71 additions and 55 deletions

View File

@ -11,9 +11,8 @@ import (
// Mocks returns |n| connected mock Blockservices
func Mocks(t *testing.T, n int) []*BlockService {
net := tn.VirtualNetwork(delay.Fixed(0))
rs := mockrouting.NewServer()
sg := bitswap.NewSessionGenerator(net, rs)
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))
sg := bitswap.NewSessionGenerator(net)
instances := sg.Instances(n)