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

style(bitswap) swap argument order

parent 7d62be76
...@@ -118,7 +118,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) { ...@@ -118,7 +118,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
// TODO(brian): perform this inside NewDHT factory method // TODO(brian): perform this inside NewDHT factory method
dhtService.Handler = route // wire the handler to the service. dhtService.Handler = route // wire the handler to the service.
exchangeSession = bitswap.NetMessageSession(ctx, exchangeService, local, d, route) exchangeSession = bitswap.NetMessageSession(ctx, local, exchangeService, route, d)
// TODO(brian): pass a context to initConnections // TODO(brian): pass a context to initConnections
go initConnections(ctx, cfg, peerstore, route) go initConnections(ctx, cfg, peerstore, route)
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
// NetMessageSession initializes a BitSwap session that communicates over the // NetMessageSession initializes a BitSwap session that communicates over the
// provided NetMessage service // provided NetMessage service
func NetMessageSession(parent context.Context, s bsnet.NetMessageService, p *peer.Peer, d ds.Datastore, directory bsnet.Routing) exchange.Interface { func NetMessageSession(parent context.Context, p *peer.Peer, s bsnet.NetMessageService, directory bsnet.Routing, d ds.Datastore) exchange.Interface {
networkAdapter := bsnet.NetMessageAdapter(s, nil) networkAdapter := bsnet.NetMessageAdapter(s, nil)
bs := &bitswap{ bs := &bitswap{
......
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