address review comments.
This commit is contained in:
parent
35d1e3d1e0
commit
8601e5da3a
@ -16,11 +16,6 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/build"
|
"github.com/filecoin-project/lotus/build"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChainIO interface {
|
|
||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type Common interface {
|
type Common interface {
|
||||||
|
|
||||||
// MethodGroup: Auth
|
// MethodGroup: Auth
|
||||||
|
@ -32,6 +32,12 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ChainIO abstracts operations for accessing raw IPLD objects.
|
||||||
|
type ChainIO interface {
|
||||||
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
|
}
|
||||||
|
|
||||||
// FullNode API is a low-level interface to the Filecoin network full node
|
// FullNode API is a low-level interface to the Filecoin network full node
|
||||||
type FullNode interface {
|
type FullNode interface {
|
||||||
Common
|
Common
|
||||||
|
@ -59,5 +59,8 @@ func (a *adaptedBlockstore) View(cid cid.Cid, callback func([]byte) error) error
|
|||||||
// View proxies over to Get and calls the callback with the value supplied by Get.
|
// View proxies over to Get and calls the callback with the value supplied by Get.
|
||||||
// Sync noops.
|
// Sync noops.
|
||||||
func Adapt(bs blockstore.Blockstore) Blockstore {
|
func Adapt(bs blockstore.Blockstore) Blockstore {
|
||||||
|
if ret, ok := bs.(Blockstore); ok {
|
||||||
|
return ret
|
||||||
|
}
|
||||||
return &adaptedBlockstore{bs}
|
return &adaptedBlockstore{bs}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user