Commit e5498be3 authored by zhiqiangxu's avatar zhiqiangxu Committed by GitHub

fix loadBlocksIntoState (#13282)

parent f9eaf1fc
...@@ -245,8 +245,8 @@ func (l *BatchSubmitter) StopBatchSubmitting(ctx context.Context) error { ...@@ -245,8 +245,8 @@ func (l *BatchSubmitter) StopBatchSubmitting(ctx context.Context) error {
// loadBlocksIntoState loads the blocks between start and end (inclusive). // loadBlocksIntoState loads the blocks between start and end (inclusive).
// If there is a reorg, it will return an error. // If there is a reorg, it will return an error.
func (l *BatchSubmitter) loadBlocksIntoState(ctx context.Context, start, end uint64) error { func (l *BatchSubmitter) loadBlocksIntoState(ctx context.Context, start, end uint64) error {
if end <= start { if end < start {
return fmt.Errorf("start number is >= end number %d,%d", start, end) return fmt.Errorf("start number is > end number %d,%d", start, end)
} }
var latestBlock *types.Block var latestBlock *types.Block
// Add all blocks to "state" // Add all blocks to "state"
......
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