Skip to content

Commit

Permalink
fix(store/v2): Remove should not error on miss (#20423)
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski authored May 18, 2024
1 parent d7cc6de commit 9fd3d13
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions store/v2/commitment/iavl/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ func NewIavlTree(db corestore.KVStoreWithBatch, logger log.Logger, cfg *Config)

// Remove removes the given key from the tree.
func (t *IavlTree) Remove(key []byte) error {
_, res, err := t.tree.Remove(key)
_, _, err := t.tree.Remove(key)
if err != nil {
return err
}
if !res {
return fmt.Errorf("key %x not found", key)
}
return nil
}

Expand Down

0 comments on commit 9fd3d13

Please sign in to comment.