Skip to content

Commit

Permalink
chore: close iterator in IterateEpochInfo (#2172)
Browse files Browse the repository at this point in the history
* chore: close iterator in IterateEpochInfo

* chore: add a line in changelog
  • Loading branch information
expertdicer authored Jan 21, 2025
1 parent 0ef4099 commit 68d837f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ needed to include double quotes around the hexadecimal string.
- [#2168](https://github.com/NibiruChain/nibiru/pull/2168) - chore(evm-solidity): Move unrelated docs, gen-embeds, and add Solidity docs
- [#2165](https://github.com/NibiruChain/nibiru/pull/2165) - fix(evm): use Singleton StateDB pattern for EVM txs
- [#2169](https://github.com/NibiruChain/nibiru/pull/2169) - fix(evm): Better handling erc20 metadata
- [#2172](https://github.com/NibiruChain/nibiru/pull/2172) - chore: close iterator in IterateEpochInfo
#### Nibiru EVM | Before Audit 2 - 2024-12-06

The codebase went through a third-party [Code4rena
Expand Down
1 change: 1 addition & 0 deletions x/epochs/keeper/epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (k Keeper) IterateEpochInfo(
iterate := k.Epochs.Iterate(ctx, &collections.Range[string]{})
i := int64(0)

defer iterate.Close()
for ; iterate.Valid(); iterate.Next() {
epoch := iterate.Value()
stop := fn(i, epoch)
Expand Down

0 comments on commit 68d837f

Please sign in to comment.