From 927ac38dc708bda4efb66cffa643b09697babc38 Mon Sep 17 00:00:00 2001 From: Connor Davis <17688291+PoisonPhang@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:59:40 -0600 Subject: [PATCH] test: use correct key types when creating validators (#19255) --- tests/integration/staking/simulation/operations_test.go | 4 ++-- tests/sims/slashing/operations_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/staking/simulation/operations_test.go b/tests/integration/staking/simulation/operations_test.go index ee472fd6e1..2c752c6ea8 100644 --- a/tests/integration/staking/simulation/operations_test.go +++ b/tests/integration/staking/simulation/operations_test.go @@ -74,7 +74,7 @@ func (s *SimTestSuite) SetupTest() { // create validator set with single validator account := accounts[0] - cmtPk, err := cryptocodec.ToCmtPubKeyInterface(account.PubKey) + cmtPk, err := cryptocodec.ToCmtPubKeyInterface(account.ConsKey.PubKey()) require.NoError(s.T(), err) validator := cmttypes.NewValidator(cmtPk, 1) @@ -277,7 +277,7 @@ func (s *SimTestSuite) TestSimulateMsgDelegate() { require.Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.DelegatorAddress) require.Equal("stake", msg.Amount.Denom) require.Equal(sdk.MsgTypeURL(&types.MsgDelegate{}), sdk.MsgTypeURL(&msg)) - require.Equal("cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) + require.Equal("cosmosvaloper122js6qry7nlgp63gcse8muknspuxur77vj3kkr", msg.ValidatorAddress) require.Len(futureOperations, 0) } diff --git a/tests/sims/slashing/operations_test.go b/tests/sims/slashing/operations_test.go index 1400f42c00..0b052f1734 100644 --- a/tests/sims/slashing/operations_test.go +++ b/tests/sims/slashing/operations_test.go @@ -67,7 +67,7 @@ func (suite *SimTestSuite) SetupTest() { // create validator (non random as using a seed) createValidator := func() (*cmttypes.ValidatorSet, error) { account := accounts[0] - cmtPk, err := cryptocodec.ToCmtPubKeyInterface(account.PubKey) + cmtPk, err := cryptocodec.ToCmtPubKeyInterface(account.ConsKey.PubKey()) if err != nil { return nil, fmt.Errorf("failed to create pubkey: %w", err) }