stubs for tracking store and live set

This commit is contained in:
vyzo 2020-11-26 16:53:16 +02:00
parent 17bc5fcd85
commit 0bf1a78b39
3 changed files with 26 additions and 14 deletions

View File

@ -0,0 +1,11 @@
package splitstore
import (
cid "github.com/ipfs/go-cid"
)
type LiveSet interface {
Mark(cid.Cid) error
Has(cid.Cid) (bool, error)
Close() error
}

View File

@ -0,0 +1,15 @@
package splitstore
import (
cid "github.com/ipfs/go-cid"
"github.com/filecoin-project/go-state-types/abi"
)
type TrackingStore interface {
Put(cid.Cid, abi.ChainEpoch) error
PutBatch([]cid.Cid, abi.ChainEpoch) error
Get(cid.Cid) (abi.ChainEpoch, error)
Delete(cid.Cid) error
Keys() (<-chan cid.Cid, error)
}

View File

@ -41,20 +41,6 @@ type SplitStore struct {
compacting bool compacting bool
} }
type TrackingStore interface {
Put(cid.Cid, abi.ChainEpoch) error
PutBatch([]cid.Cid, abi.ChainEpoch) error
Get(cid.Cid) (abi.ChainEpoch, error)
Delete(cid.Cid) error
Keys() (<-chan cid.Cid, error)
}
type LiveSet interface {
Mark(cid.Cid) error
Has(cid.Cid) (bool, error)
Close() error
}
var _ bstore.Blockstore = (*SplitStore)(nil) var _ bstore.Blockstore = (*SplitStore)(nil)
// Blockstore interface // Blockstore interface