Skip to content

Commit

Permalink
add traces for gas pool overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Dec 11, 2023
1 parent f68cc4e commit 3c84e23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ func (st *StateTransition) refundGas(refundQuotient uint64) {
remaining := new(big.Int).Mul(new(big.Int).SetUint64(st.gasRemaining), st.msg.GasPrice)
st.state.AddBalance(st.msg.From, remaining)

if st.gp.Gas() > math.MaxUint64-st.gasRemaining {
fmt.Println(st.gp.Gas(), refund, refundQuotient, st.gasUsed(), st.initialGas, st.gasUsed(), st.evm.Accesses, st.msg)
}

// Also return remaining gas to the block gas counter so it is
// available for the next transaction.
st.gp.AddGas(st.gasRemaining)
Expand Down

0 comments on commit 3c84e23

Please sign in to comment.