Commit e9eb45cd authored by Sebastian Stammler's avatar Sebastian Stammler Committed by GitHub

Merge pull request #8572 from roberto-bayardo/fix-fee-swap

fix swapped fee/tip parameters to estimateGas
parents a1bcf341 6ae65dd6
......@@ -228,8 +228,8 @@ func (m *SimpleTxManager) craftTx(ctx context.Context, candidate TxCandidate) (*
gas, err := m.backend.EstimateGas(ctx, ethereum.CallMsg{
From: m.cfg.From,
To: candidate.To,
GasFeeCap: gasFeeCap,
GasTipCap: gasTipCap,
GasFeeCap: gasFeeCap,
Data: rawTx.Data,
Value: rawTx.Value,
})
......
......@@ -211,6 +211,9 @@ func (b *mockBackend) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (ui
if b.g.err != nil {
return 0, b.g.err
}
if msg.GasFeeCap.Cmp(msg.GasTipCap) < 0 {
return 0, core.ErrTipAboveFeeCap
}
return b.g.basefee().Uint64(), nil
}
......
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