diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index bb3ea51..137dd82 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/gov" - "github.com/strangelove-ventures/interchaintest/v8" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" "github.com/stretchr/testify/suite" @@ -105,8 +105,9 @@ var ( } txCfg = e2e.TestTxConfig{ - SmallSendsNum: 1, - LargeSendsNum: 400, + SmallSendsNum: 1, + LargeSendsNum: 400, + TargetIncreaseGasPrice: sdkmath.LegacyMustNewDecFromStr("0.1"), } ) diff --git a/tests/e2e/suite.go b/tests/e2e/suite.go index de2b7d0..fbe2fd0 100644 --- a/tests/e2e/suite.go +++ b/tests/e2e/suite.go @@ -93,8 +93,9 @@ func GetOracleSideCar(node *cosmos.ChainNode) *cosmos.SidecarProcess { } type TestTxConfig struct { - SmallSendsNum int - LargeSendsNum int + SmallSendsNum int + LargeSendsNum int + TargetIncreaseGasPrice math.LegacyDec } func (tx *TestTxConfig) Validate() error { @@ -102,6 +103,14 @@ func (tx *TestTxConfig) Validate() error { return fmt.Errorf("sends num should be greater than 1") } + if tx.TargetIncreaseGasPrice.IsNil() { + return fmt.Errorf("target increase gas price is nil") + } + + if tx.TargetIncreaseGasPrice.LTE(math.LegacyZeroDec()) { + return fmt.Errorf("target increase gas price is less than or equal to 0") + } + return nil } @@ -517,7 +526,7 @@ func (s *TestSuite) TestSendTxIncrease() { baseGasPrice = s.QueryDefaultGasPrice() s.T().Log("gas price", baseGasPrice.String()) - if baseGasPrice.Amount.GT(params.MinBaseGasPrice.Mul(math.LegacyNewDec(10))) { + if baseGasPrice.Amount.GT(s.txConfig.TargetIncreaseGasPrice) { break } }