From 9b8deeb07a048fc173b473f8fa04f1bcc51960ce Mon Sep 17 00:00:00 2001 From: Cool Developer Date: Mon, 21 Oct 2024 07:34:29 -0400 Subject: [PATCH] small enhance --- store/v2/commitment/store.go | 2 +- store/v2/root/reader.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/store/v2/commitment/store.go b/store/v2/commitment/store.go index b98094af466b..5b3c7d43fa90 100644 --- a/store/v2/commitment/store.go +++ b/store/v2/commitment/store.go @@ -292,7 +292,7 @@ func (c *CommitStore) getReader(storeKey string) (Reader, error) { reader, ok := tree.(Reader) if !ok { - return nil, errors.New("tree does not implement Reader") + return nil, fmt.Errorf("tree for store %s does not implement Reader", storeKey) } return reader, nil diff --git a/store/v2/root/reader.go b/store/v2/root/reader.go index d558c543a88a..38b1d7f12a5a 100644 --- a/store/v2/root/reader.go +++ b/store/v2/root/reader.go @@ -25,8 +25,8 @@ func NewReaderMap(v uint64, vr store.VersionedReader) *ReaderMap { } } -func (roa *ReaderMap) GetReader(actor []byte) (corestore.Reader, error) { - return NewReader(roa.version, roa.vReader, actor), nil +func (rm *ReaderMap) GetReader(actor []byte) (corestore.Reader, error) { + return NewReader(rm.version, rm.vReader, actor), nil } // Reader represents a read-only adapter for accessing data from the root store.