fix(staking): avoid the double iterator close in staking (#21823)
This commit is contained in:
parent
bdda21f2f9
commit
98eb0b7cd6
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user