Skip to content

[Bug]: NewIntegrationApp does not write default genesis to state #18910

@silasdavis

Description

@silasdavis

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

In trying to use the NewIntegrationApp helper to test a module I noticed that the state written by InitChain sourced from DefaultGenesis is not written to state.

Cosmos SDK Version

main

How to reproduce?

To reproduce, run a modified Example_oneModule from https://github.com/cosmos/cosmos-sdk/blob/main/tests/integration/example/example_test.go#L119

See this PR/commit for a minimal repro:

silasdavis#1

In that commit I have removed the part of the test that calls RunMsg to set the the params with MaxMemoCharacters changed to 1000.

I would expect to see the params take their default values.

Instead of observing params that take on the values set by DefaultGenesis you see that the params take on the zero value of the Params struct, indicating that the InitChain is not writing the initial genesis state to the underlying IAVL tree.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions