Skip to content

Commit

Permalink
fix(store/v2): error info maybe covered by err = batch.Close()
Browse files Browse the repository at this point in the history
  • Loading branch information
lfz941 committed Sep 14, 2024
1 parent 47561a9 commit 35ae627
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion store/v2/commitment/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ func (m *MetadataStore) flushCommitInfo(version uint64, cInfo *proof.CommitInfo)
func (m *MetadataStore) flushRemovedStoreKeys(version uint64, storeKeys []string) (err error) {
batch := m.kv.NewBatch()
defer func() {
err = batch.Close()
cErr := batch.Close()
if err == nil {
err = cErr
}
}()

for _, storeKey := range storeKeys {
Expand Down

0 comments on commit 35ae627

Please sign in to comment.