chore: use math.Int instead of math.Int and apply linting (#12702)
* linting round * fix changelog * revert docs changes * Update CHANGELOG.md * revert an accidental change to security.md * Update simapp/integration/client/grpc/tmservice/service_test.go Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Julien Robert
parent
e7bd66841d
commit
5decd22cd3
@@ -277,6 +277,7 @@ func (k Keeper) abortProposals(ctx sdk.Context, groupPolicyAddr sdk.AccAddress)
|
||||
return err
|
||||
}
|
||||
|
||||
//nolint:gosec // "implicit memory aliasing in the for loop (because of the pointer on &proposalInfo)"
|
||||
for _, proposalInfo := range proposals {
|
||||
// Mark all proposals still in the voting phase as aborted.
|
||||
if proposalInfo.Status == group.PROPOSAL_STATUS_SUBMITTED {
|
||||
@@ -321,6 +322,7 @@ func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) error {
|
||||
return err
|
||||
}
|
||||
|
||||
//nolint:gosec // "implicit memory aliasing in the for loop (because of the pointer on &v)"
|
||||
for _, v := range votes {
|
||||
err = k.voteTable.Delete(ctx.KVStore(k.key), &v)
|
||||
if err != nil {
|
||||
@@ -375,11 +377,13 @@ func (k Keeper) PruneProposals(ctx sdk.Context) error {
|
||||
// TallyProposalsAtVPEnd iterates over all proposals whose voting period
|
||||
// has ended, tallies their votes, prunes them, and updates the proposal's
|
||||
// `FinalTallyResult` field.
|
||||
|
||||
func (k Keeper) TallyProposalsAtVPEnd(ctx sdk.Context) error {
|
||||
proposals, err := k.proposalsByVPEnd(ctx, ctx.BlockTime())
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
//nolint:gosec // "implicit memory aliasing in the for loop (because of the pointers in the loop)"
|
||||
for _, proposal := range proposals {
|
||||
policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user