Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store allows to save snapshoted state
func New ¶
func New(ds datastore.TxnDatastore, fr TipsetOrderer) (*Store, error)
New returns a new Store
func (*Store) GetLastCheckpoint ¶
GetLastCheckpoint returns the most recent saved state, and its TipSetKey. In case none exist, it will return a nil TipSetKey.
func (*Store) LoadAndPrune ¶
func (s *Store) LoadAndPrune(ctx context.Context, currHead types.TipSetKey, value interface{}) (*types.TipSetKey, error)
LoadAndPrune loads into value the last saved state before the currHead tipset branch, and returns the TipSetKey of that state. If currHead invalidates saved checkpoints those will be deleted (auto-pruning).
Click to show internal directories.
Click to hide internal directories.