From 752dbffde9aa95caafca5a2efc85e68f3031eedb Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 13 Aug 2023 22:43:17 -0500 Subject: [PATCH] Change uint64 to string --- interchaintest/chain_upgrade_test.go | 8 ++++---- interchaintest/helpers/mint.go | 2 +- interchaintest/helpers/slashing.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interchaintest/chain_upgrade_test.go b/interchaintest/chain_upgrade_test.go index acb6e51ac..26273c671 100644 --- a/interchaintest/chain_upgrade_test.go +++ b/interchaintest/chain_upgrade_test.go @@ -74,18 +74,18 @@ func CosmosChainUpgradeTest(t *testing.T, chainName, initialVersion, upgradeBran func preUpgradeChecks(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) { mp := helpers.GetMintParams(t, ctx, chain) // mainnet it is 5048093, but we are just ensuring the upgrade applies correctly from default. - require.Equal(t, mp.BlocksPerYear, uint64(6311520)) + require.Equal(t, mp.BlocksPerYear, "6311520") sp := helpers.GetSlashingParams(t, ctx, chain) - require.Equal(t, sp.SignedBlocksWindow, uint64(100)) + require.Equal(t, sp.SignedBlocksWindow, "100") } func postUpgradeChecks(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) { mp := helpers.GetMintParams(t, ctx, chain) - require.Equal(t, mp.BlocksPerYear, uint64(12623040)) // double default + require.Equal(t, mp.BlocksPerYear, "12623040") // double default sp := helpers.GetSlashingParams(t, ctx, chain) - require.Equal(t, sp.SignedBlocksWindow, uint64(200)) + require.Equal(t, sp.SignedBlocksWindow, "200") } func UpgradeNodes(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, client *client.Client, haltHeight uint64, upgradeRepo, upgradeBranchVersion string) { diff --git a/interchaintest/helpers/mint.go b/interchaintest/helpers/mint.go index eee56d843..3b154bc32 100644 --- a/interchaintest/helpers/mint.go +++ b/interchaintest/helpers/mint.go @@ -14,7 +14,7 @@ type MintParams struct { // type of coin to mint MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` // expected blocks per year - BlocksPerYear uint64 `protobuf:"varint,2,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty" yaml:"blocks_per_year"` + BlocksPerYear string `protobuf:"varint,2,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty" yaml:"blocks_per_year"` } func GetMintParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) MintParams { diff --git a/interchaintest/helpers/slashing.go b/interchaintest/helpers/slashing.go index 7007dcff8..46dfc46b5 100644 --- a/interchaintest/helpers/slashing.go +++ b/interchaintest/helpers/slashing.go @@ -12,7 +12,7 @@ import ( ) type SlashingParams struct { - SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"` + SignedBlocksWindow string `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"` MinSignedPerWindow sdk.Dec `protobuf:"bytes,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_signed_per_window"` DowntimeJailDuration time.Duration `protobuf:"bytes,3,opt,name=downtime_jail_duration,json=downtimeJailDuration,proto3,stdduration" json:"downtime_jail_duration"` SlashFractionDoubleSign sdk.Dec `protobuf:"bytes,4,opt,name=slash_fraction_double_sign,json=slashFractionDoubleSign,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_double_sign"`