Commit e466b9dd authored by Jeromy's avatar Jeromy

wire GetBlocks into blockservice

parent 373e19cd
......@@ -30,7 +30,7 @@ func (_ *offlineExchange) GetBlock(context.Context, u.Key) (*blocks.Block, error
}
// HasBlock always returns nil.
func (_ *offlineExchange) HasBlock(context.Context, blocks.Block) error {
func (_ *offlineExchange) HasBlock(context.Context, *blocks.Block) error {
return nil
}
......@@ -38,3 +38,7 @@ func (_ *offlineExchange) HasBlock(context.Context, blocks.Block) error {
func (_ *offlineExchange) Close() error {
return nil
}
func (_ *offlineExchange) GetBlocks(context.Context, []u.Key) (<-chan *blocks.Block, error) {
return nil, OfflineMode
}
......@@ -21,7 +21,7 @@ func TestBlockReturnsErr(t *testing.T) {
func TestHasBlockReturnsNil(t *testing.T) {
off := Exchange()
block := blocks.NewBlock([]byte("data"))
err := off.HasBlock(context.Background(), *block)
err := off.HasBlock(context.Background(), block)
if err != nil {
t.Fatal("")
}
......
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