Skip to content

Commit

Permalink
fix: systemTx should be always at the end of block
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzckck committed Mar 12, 2024
1 parent 7169e2b commit 7525280
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
continue
}
}
if p.config.IsCancun(block.Number(), block.Time()) {
if len(systemTxs) > 0 {
// systemTxs should be always at the end of block.
return statedb, nil, nil, 0, fmt.Errorf("normal tx %d [%v] after systemTx", i, tx.Hash().Hex())
}
}

msg, err := TransactionToMessage(tx, signer, header.BaseFee)
if err != nil {
Expand Down

0 comments on commit 7525280

Please sign in to comment.