@cryptotaxi247 / kubo / commits / 9a18fd635

chore(exch, bitswap) misc trivial cleanup

Brian Tiger Chow committed Sep 18, 2014 at 19:52 UTC 9a18fd6354933a58488e75e984426d8d115ebf0a
1 file changed +2 -6
exchange/bitswap/bitswap.go
+2 -6
@@ -1,8 +1,6 @@
1 package bitswap
2
3 import (
4 - "errors"
5 -
4 context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
5 ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
6
@@ -20,7 +18,6 @@ import (
18 // TODO rename -> Router?
19 type Routing interface {
20 // FindProvidersAsync returns a channel of providers for the given key
23 - // TODO replace with timeout with context
21 FindProvidersAsync(context.Context, u.Key, int) <-chan *peer.Peer
22
23 // Provide provides the key to the network
@@ -66,8 +63,7 @@ type bitswap struct {
63
64 // GetBlock attempts to retrieve a particular block from peers within the
65 // deadline enforced by the context
69 -func (bs *bitswap) Block(ctx context.Context, k u.Key) (
70 - *blocks.Block, error) {
66 +func (bs *bitswap) Block(ctx context.Context, k u.Key) (*blocks.Block, error) {
67
68 provs_ch := bs.routing.FindProvidersAsync(ctx, k, 20)
69
@@ -161,7 +157,7 @@ func (bs *bitswap) ReceiveMessage(
157 }
158 }
159 }
164 - return nil, nil, errors.New("TODO implement")
160 + return nil, nil, nil
161 }
162
163 // send strives to ensure that accounting is always performed when a message is