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 Feb 28, 2024
1 parent ac7c97e commit 9cd951a
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 @@ -508,6 +508,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 9cd951a

Please sign in to comment.