Commit 0a7f5a46 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

fix: no gas refund (#1043)

* l2geth: remove the gas refund

* chore: add changeset
parent 8fee7bed
---
'@eth-optimism/l2geth': patch
---
Removes the gas refund for unused gas in geth since it is instead managed in the smart contracts
......@@ -280,6 +280,9 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo
}
func (st *StateTransition) refundGas() {
if vm.UsingOVM {
return
}
// Apply refund counter, capped to half of the used gas.
refund := st.gasUsed() / 2
if refund > st.state.GetRefund() {
......
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