Skip to content

Commit

Permalink
Fix delegation address and extra height
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed May 8, 2024
1 parent 81c8a92 commit b81752d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion tests/mbt/driver/mbt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,6 @@ func CompareValidatorSets(
// get the validator for that address on the provider
providerVal, err := driver.providerStakingKeeper().GetValidatorByConsAddr(driver.providerCtx(), providerConsAddr.Address)
require.Nil(t, err, "Error getting provider validator")
require.True(t, found, "Error getting provider validator")

// use the moniker of that validator
consumerCurValSet[providerVal.GetMoniker()] = val.Power
Expand Down
12 changes: 1 addition & 11 deletions tests/mbt/driver/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func getAppBytesAndSenders(
stakingValidators = append(stakingValidators, validator)

// Store delegation from the model delegator account
delegations = append(delegations, stakingtypes.NewDelegation(senderAccounts[0].SenderAccount.GetAddress().String(), val.Address.String(), delShares))
delegations = append(delegations, stakingtypes.NewDelegation(senderAccounts[0].SenderAccount.GetAddress().String(), validator.GetOperator(), delShares))

// add initial validator powers so consumer InitGenesis runs correctly
pub, _ := val.ToProto()
Expand Down Expand Up @@ -271,16 +271,6 @@ func newChain(
},
)

app.Commit()

app.FinalizeBlock(
&abcitypes.RequestFinalizeBlock{
Hash: app.LastCommitID().Hash,
Height: app.LastBlockHeight() + 1,
NextValidatorsHash: validators.Hash(),
},
)

chain := &ibctesting.TestChain{
TB: t,
Coordinator: coord,
Expand Down

0 comments on commit b81752d

Please sign in to comment.