Skip to content

Conversation

santamasa
Copy link

chainsuite.ProviderUnbondingTime is most likely a time.Duration, but it's being multiplied by 10000000 before converting to a string. This results in an incorrect value in the genesis config.

Instead of multiplying, it's better to use .Nanoseconds() to get the correct format:

Before:

cosmos.NewGenesisKV("app_state.staking.params.unbonding_time", (chainsuite.ProviderUnbondingTime * 10000000).String()),

After:

cosmos.NewGenesisKV("app_state.staking.params.unbonding_time", strconv.FormatInt(chainsuite.ProviderUnbondingTime.Nanoseconds(), 10)),

This ensures the unbonding time is correctly serialized in nanoseconds.

@santamasa santamasa requested a review from a team April 2, 2025 08:37
@github-actions github-actions bot added the C:Testing Assigned automatically by the PR labeler label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Testing Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant