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:

committed by
Juan Batiz-Benet

parent
c6294646e9
commit
27dc9594ba
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user