Commit 8704c1c1 authored by Kevin Atkinson's avatar Kevin Atkinson

gx update and fix code to use new Cid type

parent e29dbe2f
...@@ -24,7 +24,7 @@ type offlineExchange struct { ...@@ -24,7 +24,7 @@ type offlineExchange struct {
// GetBlock 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. // given key.
// NB: This function may return before the timeout expires. // NB: This function may return before the timeout expires.
func (e *offlineExchange) GetBlock(_ context.Context, k *cid.Cid) (blocks.Block, error) { func (e *offlineExchange) GetBlock(_ context.Context, k cid.Cid) (blocks.Block, error) {
return e.bs.Get(k) return e.bs.Get(k)
} }
...@@ -40,11 +40,11 @@ func (_ *offlineExchange) Close() error { ...@@ -40,11 +40,11 @@ func (_ *offlineExchange) Close() error {
return nil return nil
} }
func (e *offlineExchange) GetBlocks(ctx context.Context, ks []*cid.Cid) (<-chan blocks.Block, error) { func (e *offlineExchange) GetBlocks(ctx context.Context, ks []cid.Cid) (<-chan blocks.Block, error) {
out := make(chan blocks.Block) out := make(chan blocks.Block)
go func() { go func() {
defer close(out) defer close(out)
var misses []*cid.Cid var misses []cid.Cid
for _, k := range ks { for _, k := range ks {
hit, err := e.bs.Get(k) hit, err := e.bs.Get(k)
if err != nil { if err != nil {
......
...@@ -51,8 +51,8 @@ func TestGetBlocks(t *testing.T) { ...@@ -51,8 +51,8 @@ func TestGetBlocks(t *testing.T) {
} }
} }
request := func() []*cid.Cid { request := func() []cid.Cid {
var ks []*cid.Cid var ks []cid.Cid
for _, b := range expected { for _, b := range expected {
ks = append(ks, b.Cid()) ks = append(ks, b.Cid())
......
...@@ -9,33 +9,33 @@ ...@@ -9,33 +9,33 @@
"gxDependencies": [ "gxDependencies": [
{ {
"author": "hsanjuan", "author": "hsanjuan",
"hash": "Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i", "hash": "QmeMussyD8s3fQ3pM19ZsfbxvomEqPV9FvczLMWyBDYSnS",
"name": "go-ipfs-blockstore", "name": "go-ipfs-blockstore",
"version": "0.0.20" "version": "0.1.0"
}, },
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb", "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7",
"name": "go-cid", "name": "go-cid",
"version": "0.8.0" "version": "0.9.0"
}, },
{ {
"author": "hsanjuan", "author": "hsanjuan",
"hash": "QmWw71Mz9PXKgYG8ZfTYN7Ax2Zm48Eurbne3wC2y7CKmLz", "hash": "QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM",
"name": "go-ipfs-exchange-interface", "name": "go-ipfs-exchange-interface",
"version": "0.0.6" "version": "0.1.0"
}, },
{ {
"author": "stebalien", "author": "stebalien",
"hash": "QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3", "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM",
"name": "go-block-format", "name": "go-block-format",
"version": "0.1.11" "version": "0.2.0"
}, },
{ {
"author": "hsanjuan", "author": "hsanjuan",
"hash": "Qmc3bqcjeTjbvgbMW5MvW8SBXnEmTquEx9CXSjT2myoFmi", "hash": "QmUf9xAmbHndjh31YNRugNeyNX6mDTUDuWN1bVTmUriwdZ",
"name": "go-ipfs-blocksutil", "name": "go-ipfs-blocksutil",
"version": "0.0.6" "version": "0.1.0"
} }
], ],
"gxVersion": "0.12.1", "gxVersion": "0.12.1",
......
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