Skip to content

Commit

Permalink
Use KeyCopy instead of Key in BadgerIterator (cosmos#274)
Browse files Browse the repository at this point in the history
* fix: use KeyCopy instead of Key in BadgerIterator
* docs: update CHANGELOG-PENDING.md
  • Loading branch information
tzdybal committed Feb 3, 2022
1 parent 7a6e310 commit 67f51f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ Month, DD, YYYY
- [store,indexer] [Replace tm-db dependency with store package #268](https://github.com/celestiaorg/optimint/pull/268) [@tzdybal](https://github.com/tzdybal/)

### BUG FIXES
- [store] [Use KeyCopy instead of Key in BadgerIterator #274](https://github.com/celestiaorg/optimint/pull/274) [@tzdybal](https://github.com/tzdybal/)

- [go package] (Link to PR) Description @username
2 changes: 1 addition & 1 deletion store/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (i *BadgerIterator) Next() {
}

func (i *BadgerIterator) Key() []byte {
return i.iter.Item().Key()
return i.iter.Item().KeyCopy(nil)
}

func (i *BadgerIterator) Value() []byte {
Expand Down

0 comments on commit 67f51f7

Please sign in to comment.