Skip to content

Commit

Permalink
fix(staking): avoid the double iterator close in staking (#21823)
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-develope authored Sep 19, 2024
1 parent bdda21f commit 98eb0b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x/staking/keeper/cons_pubkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ func (k Keeper) GetBlockConsPubKeyRotationHistory(ctx context.Context) ([]types.
if err != nil {
return nil, err
}
defer iterator.Close()

// iterator would be closed in the CollectValues
return indexes.CollectValues(ctx, k.RotationHistory, iterator)
}

Expand Down

0 comments on commit 98eb0b7

Please sign in to comment.