Commit 36efcdec authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

Merge pull request #2239 from ethereum-optimism/l2geth/gas-oracle-fix

l2geth: remove dead code
parents 9a4f9ad2 0002b1df
---
'@eth-optimism/l2geth': patch
---
Remove dead code in l2geth
...@@ -186,16 +186,8 @@ func (st *StateTransition) buyGas() error { ...@@ -186,16 +186,8 @@ func (st *StateTransition) buyGas() error {
} }
} }
if st.state.GetBalance(st.msg.From()).Cmp(mgval) < 0 { if st.state.GetBalance(st.msg.From()).Cmp(mgval) < 0 {
if rcfg.UsingOVM {
// Hack to prevent race conditions with the `gas-oracle`
// where policy level balance checks pass and then fail
// during consensus. The user gets some free gas
// in this case.
mgval = st.state.GetBalance(st.msg.From())
} else {
return errInsufficientBalanceForGas return errInsufficientBalanceForGas
} }
}
if err := st.gp.SubGas(st.msg.Gas()); err != nil { if err := st.gp.SubGas(st.msg.Gas()); err != nil {
return err return err
} }
......
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