@cryptotaxi247 / kubo / commits / 5426a1b51

refactor(blockservice) use bitswap.Exchange interface

Brian Tiger Chow committed Sep 15, 2014 at 04:35 UTC 5426a1b51276fed9adf5dfe48f72785348d3dfdf
1 file changed +2 -2
blockservice/blockservice.go
+2 -2
@@ -16,11 +16,11 @@ import (
16 // It uses an internal `datastore.Datastore` instance to store values.
17 type BlockService struct {
18 Datastore ds.Datastore
19 - Remote *bitswap.BitSwap
19 + Remote bitswap.Exchange
20 }
21
22 // NewBlockService creates a BlockService with given datastore instance.
23 -func NewBlockService(d ds.Datastore, rem *bitswap.BitSwap) (*BlockService, error) {
23 +func NewBlockService(d ds.Datastore, rem bitswap.Exchange) (*BlockService, error) {
24 if d == nil {
25 return nil, fmt.Errorf("BlockService requires valid datastore")
26 }