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

feat: add moduleStateCb to allow access moduleState in sim test (backport #15903) #15924

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 24, 2023

This is an automatic backport of pull request #15903 done by Mergify.
Cherry-pick of 4d41a87 has failed:

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

You are currently cherry-picking commit 4d41a87a3.
  (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:   testutil/sims/state_helpers.go
	modified:   types/simulation/types.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

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

Co-authored-by: Julien Robert <julien@rbrt.fr>
(cherry picked from commit 4d41a87)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot requested a review from a team as a code owner April 24, 2023 13:09
@mergify mergify bot added the conflicts label Apr 24, 2023
appState json.RawMessage, accounts []Account, chainId string, genesisTimestamp time.Time,
)
// Deprecated: Use AppStateFn instead. This will be removed in a future relase.
type AppStateFnWithExtendedCb AppStateFn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if not used, this makes v0.47 still not API breaking: #15903 (comment).
It will be then deleted in v0.48.

Comment on lines +165 to +173
for name, state := range map[string]proto.Message{
stakingtypes.ModuleName: stakingState,
banktypes.ModuleName: bankState,
} {
if moduleStateCb != nil {
moduleStateCb(name, state)
}
rawState[name] = cdc.MustMarshalJSON(state)
}

Check warning

Code scanning / CodeQL

Iteration over map

Iteration over map may be a possible source of non-determinism
@julienrbrt julienrbrt merged commit 0cb3995 into release/v0.47.x Apr 24, 2023
@julienrbrt julienrbrt deleted the mergify/bp/release/v0.47.x/pr-15903 branch April 24, 2023 16:00
roy-dydx pushed a commit to dydxprotocol/cosmos-sdk that referenced this pull request Jul 11, 2023
…port cosmos#15903) (cosmos#15924)

Co-authored-by: mmsqe <tqd0800210105@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants