Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Jan 13, 2025
1 parent c3e45e3 commit 80c696c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,8 @@ func (st *StateTransition) preCheck(gasBailout bool) error {
if err != nil {
return fmt.Errorf("%w: %w", ErrStateTransitionFailed, err)
}
if want := st.msg.Value(); have.Cmp(want) < 0 {
if !gasBailout {
return fmt.Errorf("%w: address %v have %v want %v", ErrInsufficientFunds, st.msg.From().Hex(), have, want)
}
if have.Cmp(st.msg.Value()) < 0 && !gasBailout {
return fmt.Errorf("%w: address %v have %v want %v", ErrInsufficientFunds, st.msg.From().Hex(), have, st.msg.Value())
}
// No fee fields to check, no nonce to check, and no need to check if EOA (L1 already verified it for us)
// Gas is free, but no refunds!
Expand Down

0 comments on commit 80c696c

Please sign in to comment.