Skip to content

Commit

Permalink
Merge pull request XinFinOrg#739 from gzliudan/fix-preCheck
Browse files Browse the repository at this point in the history
core: fix preCheck for RandomizeSMC after EIP-1559
  • Loading branch information
gzliudan authored Nov 19, 2024
2 parents 370c6b6 + 4855f19 commit 8e72c6d
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 @@ -267,7 +267,7 @@ func (st *StateTransition) preCheck() error {
}
// This will panic if baseFee is nil, but basefee presence is verified
// as part of header validation.
if st.gasFeeCap.Cmp(st.evm.Context.BaseFee) < 0 {
if (msg.To() == nil || *msg.To() != common.RandomizeSMCBinary) && st.gasFeeCap.Cmp(st.evm.Context.BaseFee) < 0 {
return fmt.Errorf("%w: address %v, maxFeePerGas: %s baseFee: %s", ErrFeeCapTooLow,
msg.From().Hex(), st.gasFeeCap, st.evm.Context.BaseFee)
}
Expand Down

0 comments on commit 8e72c6d

Please sign in to comment.