From 10283766013a373c8c94e3ef63e64ff36eece949 Mon Sep 17 00:00:00 2001 From: zjuncal Date: Thu, 12 Nov 2026 16:56:22 +0800 Subject: [PATCH] docs(store): correct misleading and ungrammatical doc comments Signed-off-by: zjuncal --- pkg/store/store.go | 4 ++-- pkg/store/types.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/store/store.go b/pkg/store/store.go index ac6fb1f3fa..9b2b67c558 100644 --- a/pkg/store/store.go +++ b/pkg/store/store.go @@ -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 { @@ -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 { diff --git a/pkg/store/types.go b/pkg/store/types.go index 660ae5d636..1e6a071c63 100644 --- a/pkg/store/types.go +++ b/pkg/store/types.go @@ -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 @@ -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 }