Commit 2edc03ac authored by Brian Tiger Chow's avatar Brian Tiger Chow

style(bs:tx) rename network -> transmission

parent 806b3c29
......@@ -8,8 +8,8 @@ import (
ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
bsmsg "github.com/jbenet/go-ipfs/bitswap/message"
bsnet "github.com/jbenet/go-ipfs/bitswap/network"
notifications "github.com/jbenet/go-ipfs/bitswap/notifications"
tx "github.com/jbenet/go-ipfs/bitswap/transmission"
blocks "github.com/jbenet/go-ipfs/blocks"
swarm "github.com/jbenet/go-ipfs/net/swarm"
peer "github.com/jbenet/go-ipfs/peer"
......@@ -33,7 +33,7 @@ type BitSwap struct {
peer *peer.Peer
// net holds the connections to all peers.
sender bsnet.Sender
sender tx.Sender
net swarm.Network
meschan *swarm.Chan
......@@ -65,7 +65,7 @@ type BitSwap struct {
// NewBitSwap creates a new BitSwap instance. It does not check its parameters.
func NewBitSwap(p *peer.Peer, net swarm.Network, d ds.Datastore, r routing.IpfsRouting) *BitSwap {
receiver := receiver{}
sender := bsnet.NewBSNetService(context.Background(), &receiver)
sender := tx.NewBSNetService(context.Background(), &receiver)
bs := &BitSwap{
peer: p,
net: net,
......
......@@ -3,7 +3,7 @@ package bitswap
import (
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
bsmsg "github.com/jbenet/go-ipfs/bitswap/message"
bsnet "github.com/jbenet/go-ipfs/bitswap/network"
tx "github.com/jbenet/go-ipfs/bitswap/transmission"
peer "github.com/jbenet/go-ipfs/peer"
)
......@@ -12,7 +12,7 @@ import (
// as a constructor argument to BitSwap. However, the handler is BitSwap!
// Hence, this receiver.
type receiver struct {
delegate bsnet.Receiver
delegate tx.Receiver
}
func (r *receiver) ReceiveMessage(
......@@ -24,6 +24,6 @@ func (r *receiver) ReceiveMessage(
return r.delegate.ReceiveMessage(ctx, sender, incoming)
}
func (r *receiver) Delegate(delegate bsnet.Receiver) {
func (r *receiver) Delegate(delegate tx.Receiver) {
r.delegate = delegate
}
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