Skip to content

Commit

Permalink
only run when eip-1559 is active
Browse files Browse the repository at this point in the history
  • Loading branch information
mycodecrafting committed May 2, 2024
1 parent a8d46f5 commit ff97b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
st.state.AddBalance(st.evm.Context.Coinbase, fee)

// collect base fee instead of burn
if st.evm.Context.Coinbase.Cmp(common.Address{}) != 0 {
if rules.IsLondon && st.evm.Context.Coinbase.Cmp(common.Address{}) != 0 {
baseFee := new(big.Int).SetUint64(st.gasUsed())
baseFee.Mul(baseFee, st.evm.Context.BaseFee)
st.state.AddBalance(st.evm.Context.Coinbase, baseFee)
Expand Down

0 comments on commit ff97b6b

Please sign in to comment.