Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Feb 27, 2025
2 parents 941064b + ebc14ef commit 3f89a5f
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions eth/gasprice/gasprice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,21 +399,14 @@ func TestSuggestTipCapMaxBlocksSecondsLookback(t *testing.T) {
}

func TestSuggestTipCapIncludesExtraDataGas(t *testing.T) {
applyGasPriceTest(t, suggestTipCapTest{
chainConfig: params.TestChainConfig,
numBlocks: 20,
extDataGasUsage: DefaultMinGasUsed,
genBlock: testGenBlock(t, 100_000, 1),
expectedTip: big.NewInt(1),
}, timeCrunchOracleConfig())
}

func TestSuggestTipCapLargeTip(t *testing.T) {
applyGasPriceTest(t, suggestTipCapTest{
chainConfig: params.TestChainConfig,
numBlocks: 1000,
extDataGasUsage: big.NewInt(acp176.MinMaxPerSecond - int64(params.TxGas)),
genBlock: testGenBlock(t, 550, 1),
expectedTip: big.NewInt(44_252),
// The tip on the transaction is very large to pay the block gas cost.
genBlock: testGenBlock(t, 100_000, 1),
// The actual tip doesn't matter, we just want to ensure that the tip is
// non-zero when almost all the gas is coming from the extDataGasUsage.
expectedTip: big.NewInt(44_252),
}, defaultOracleConfig())
}

0 comments on commit 3f89a5f

Please sign in to comment.