chore(batch_proposer): add more check for batchTxNumThreshold (#180)

This commit is contained in:
HAOYUatHZ
2022-12-26 14:16:39 +08:00
committed by GitHub
parent feaa95aefe
commit e17647bc9f

View File

@@ -60,6 +60,11 @@ func (w *batchProposer) tryProposeBatch() error {
return w.createBatchForBlocks(blocks[:1])
}
if blocks[0].TxNum > w.batchTxNumThreshold {
log.Warn("too many txs even for only 1 block", "height", blocks[0].Number, "tx_num", blocks[0].TxNum)
return w.createBatchForBlocks(blocks[:1])
}
var (
length = len(blocks)
gasUsed, txNum uint64