fix: systemTx should be always at the end of block (#2277)

This commit is contained in:
zzzckck 2024-03-12 21:11:20 +08:00 committed by GitHub
parent 7169e2b864
commit a4b436806e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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 {