feat(taiko_miner): remove an unnecessary check (#239)

This commit is contained in:
maskpp 2024-05-08 16:14:54 +08:00 committed by GitHub
parent 6cc43e1d9c
commit 974b338e20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,15 +172,6 @@ func (w *worker) sealBlockWith(
env.gasPool = new(core.GasPool).AddGas(gasLimit)
for i, tx := range txs {
if tx.ChainId().Cmp(w.chainConfig.ChainID) != 0 {
if i == 0 {
return nil, fmt.Errorf("anchor tx with invalid chain id, expected: %v, actual: %v", w.chainConfig.ChainID, tx.ChainId())
} else {
log.Debug("Skip an proposed transaction with invalid chain id", "hash", tx.Hash(), "expect", w.chainConfig.ChainID, "actual", tx.ChainId())
continue
}
}
if i == 0 {
if err := tx.MarkAsAnchor(); err != nil {
return nil, err