Commit 730199cc authored by zhiqiangxu's avatar zhiqiangxu Committed by GitHub

remove impossible condition (#9885)

parent 22dd936f
...@@ -117,11 +117,7 @@ func (bq *BatchQueue) NextBatch(ctx context.Context, parent eth.L2BlockRef) (*Si ...@@ -117,11 +117,7 @@ func (bq *BatchQueue) NextBatch(ctx context.Context, parent eth.L2BlockRef) (*Si
for i, l1Block := range bq.l1Blocks { for i, l1Block := range bq.l1Blocks {
if parent.L1Origin.Number == l1Block.Number { if parent.L1Origin.Number == l1Block.Number {
bq.l1Blocks = bq.l1Blocks[i:] bq.l1Blocks = bq.l1Blocks[i:]
if len(bq.l1Blocks) > 0 {
bq.log.Debug("Advancing internal L1 blocks", "next_epoch", bq.l1Blocks[0].ID(), "next_epoch_time", bq.l1Blocks[0].Time) bq.log.Debug("Advancing internal L1 blocks", "next_epoch", bq.l1Blocks[0].ID(), "next_epoch_time", bq.l1Blocks[0].Time)
} else {
bq.log.Debug("Advancing internal L1 blocks. No L1 blocks left")
}
break break
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment