Commit abc92d59 authored by Jeromy's avatar Jeromy

beginnings of a bitswap refactor

parent 7715d637
......@@ -23,10 +23,10 @@ func NewOfflineExchange() exchange.Interface {
type offlineExchange struct {
}
// Block returns nil to signal that a block could not be retrieved for the
// GetBlock returns nil to signal that a block could not be retrieved for the
// given key.
// NB: This function may return before the timeout expires.
func (_ *offlineExchange) Block(context.Context, u.Key) (*blocks.Block, error) {
func (_ *offlineExchange) GetBlock(context.Context, u.Key) (*blocks.Block, error) {
return nil, OfflineMode
}
......
......@@ -11,7 +11,7 @@ import (
func TestBlockReturnsErr(t *testing.T) {
off := NewOfflineExchange()
_, err := off.Block(context.Background(), u.Key("foo"))
_, err := off.GetBlock(context.Background(), u.Key("foo"))
if err != nil {
return // as desired
}
......
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