Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (s *DefaultStore) DeleteStateAtHeight(ctx context.Context, height uint64) e
return nil
}

// SetMetadata saves arbitrary value in the store.
// SetMetadata saves an arbitrary value in the store.
//
// Metadata is separated from other data by using prefix in KV.
func (s *DefaultStore) SetMetadata(ctx context.Context, key string, value []byte) error {
Expand Down Expand Up @@ -216,7 +216,7 @@ func (s *DefaultStore) BatchMetadata(ctx context.Context, puts []MetadataKV, del
return nil
}

// GetMetadata returns values stored for given key with SetMetadata.
// GetMetadata returns the value stored for the given key by SetMetadata.
func (s *DefaultStore) GetMetadata(ctx context.Context, key string) ([]byte, error) {
data, err := s.db.Get(ctx, ds.NewKey(GetMetaKey(key)))
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/store/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type MetadataKV struct {
}

type Metadata interface {
// SetMetadata saves arbitrary value in the store.
// SetMetadata saves an arbitrary value in the store.
//
// This method enables evolve to safely persist any information.
SetMetadata(ctx context.Context, key string, value []byte) error
Expand Down Expand Up @@ -94,12 +94,12 @@ type Reader interface {
// GetStateAtHeight returns state saved at given height, or error if it's not found in Store.
GetStateAtHeight(ctx context.Context, height uint64) (types.State, error)

// GetMetadata returns values stored for given key with SetMetadata.
// GetMetadata returns the value stored for the given key by SetMetadata.
GetMetadata(ctx context.Context, key string) ([]byte, error)
}

type Rollback interface {
// Rollback deletes x height from the ev-node store.
// Rollback rolls back block data until the given height from the ev-node store.
// Aggregator is used to determine if the rollback is performed on the aggregator node.
Rollback(ctx context.Context, height uint64, aggregator bool) error
}
Expand Down
Loading