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

refactor(bitswap/testnet) extract interface in prep for mockpeernet version

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 4edd768c
package bitswap
import (
bsnet "github.com/jbenet/go-ipfs/exchange/bitswap/network"
peer "github.com/jbenet/go-ipfs/peer"
"github.com/jbenet/go-ipfs/util/testutil"
)
type Network interface {
Adapter(testutil.Peer) bsnet.BitSwapNetwork
HasPeer(peer.ID) bool
}
...@@ -15,14 +15,6 @@ import ( ...@@ -15,14 +15,6 @@ import (
testutil "github.com/jbenet/go-ipfs/util/testutil" testutil "github.com/jbenet/go-ipfs/util/testutil"
) )
type Network interface {
Adapter(testutil.Peer) bsnet.BitSwapNetwork
HasPeer(peer.ID) bool
}
// network impl
func VirtualNetwork(rs mockrouting.Server, d delay.D) Network { func VirtualNetwork(rs mockrouting.Server, d delay.D) Network {
return &network{ return &network{
clients: make(map[peer.ID]bsnet.Receiver), clients: make(map[peer.ID]bsnet.Receiver),
......
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