Commit 8ddb6997 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #3920 from ethereum-optimism/jg/action_test_stability

op-e2e: Use head rather than pending block for gas estimation
parents 4950656a 07e7310c
...@@ -122,11 +122,11 @@ func (s *BasicUser[B]) signerFn(address common.Address, tx *types.Transaction) ( ...@@ -122,11 +122,11 @@ func (s *BasicUser[B]) signerFn(address common.Address, tx *types.Transaction) (
// ActResetTxOpts prepares the tx options to default values, based on the current pending block header. // ActResetTxOpts prepares the tx options to default values, based on the current pending block header.
func (s *BasicUser[B]) ActResetTxOpts(t Testing) { func (s *BasicUser[B]) ActResetTxOpts(t Testing) {
pendingHeader, err := s.env.EthCl.HeaderByNumber(t.Ctx(), big.NewInt(-1)) latestHeader, err := s.env.EthCl.HeaderByNumber(t.Ctx(), nil)
require.NoError(t, err, "need l2 pending header for accurate basefee info") require.NoError(t, err, "need l2 latest header for accurate basefee info")
gasTipCap := big.NewInt(2 * params.GWei) gasTipCap := big.NewInt(2 * params.GWei)
gasFeeCap := new(big.Int).Add(gasTipCap, new(big.Int).Mul(pendingHeader.BaseFee, big.NewInt(2))) gasFeeCap := new(big.Int).Add(gasTipCap, new(big.Int).Mul(latestHeader.BaseFee, big.NewInt(2)))
s.txOpts = bind.TransactOpts{ s.txOpts = bind.TransactOpts{
From: s.address, From: s.address,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment