Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(x/distribution): audit changes (backport #16785) #16799

Merged
merged 2 commits into from
Jun 30, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 30, 2023

This is an automatic backport of pull request #16785 done by Mergify.
Cherry-pick of ec1f0c5 has failed:

On branch mergify/bp/release/v0.50.x/pr-16785
Your branch is up to date with 'origin/release/v0.50.x'.

You are currently cherry-picking commit ec1f0c5df.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   x/distribution/abci.go
	modified:   x/distribution/keeper/genesis.go
	modified:   x/distribution/keeper/hooks.go
	modified:   x/distribution/keeper/msg_server.go
	modified:   x/distribution/keeper/store.go
	modified:   x/distribution/types/msg.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   tests/integration/distribution/keeper/grpc_query_test.go
	both modified:   tests/integration/distribution/keeper/msg_server_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

(cherry picked from commit ec1f0c5)

# Conflicts:
#	tests/integration/distribution/keeper/grpc_query_test.go
#	tests/integration/distribution/keeper/msg_server_test.go
@mergify mergify bot requested a review from a team as a code owner June 30, 2023 13:15
@mergify mergify bot added the conflicts label Jun 30, 2023
@github-actions github-actions bot added the C:x/distribution distribution module related label Jun 30, 2023
@@ -23,11 +23,12 @@
// TODO this is Tendermint-dependent
// ref https://github.com/cosmos/cosmos-sdk/issues/3095
if ctx.BlockHeight() > 1 {
k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos())
if err := k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()); err != nil {

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call
}

// record the proposer for when we payout on the next block
consAddr := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress)
k.SetPreviousProposerConsAddr(ctx, consAddr)
return nil
return k.SetPreviousProposerConsAddr(ctx, consAddr)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call
@julienrbrt julienrbrt enabled auto-merge (squash) June 30, 2023 14:38
@julienrbrt julienrbrt merged commit 950b910 into release/v0.50.x Jun 30, 2023
@julienrbrt julienrbrt deleted the mergify/bp/release/v0.50.x/pr-16785 branch June 30, 2023 14:51
@faddat faddat mentioned this pull request Nov 8, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/distribution distribution module related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants