Skip to content

Commit

Permalink
Change uint64 to string
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Aug 14, 2023
1 parent 092c6c7 commit 752dbff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions interchaintest/chain_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion interchaintest/helpers/mint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion interchaintest/helpers/slashing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 752dbff

Please sign in to comment.