Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Sep 18, 2024
1 parent d2c9fdd commit 99916b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollup/internal/controller/watcher/batch_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ func (p *BatchProposer) updateDBBatchInfo(batch *encoding.Batch, codecVersion en
}

if len(batch.Chunks) > 0 && len(batch.Chunks[len(batch.Chunks)-1].Blocks) > 0 {
lastBlock := batch.Chunks[len(batch.Chunks)-1].Blocks[len(batch.Chunks[len(batch.Chunks)-1].Blocks)-1]
lastChunk := batch.Chunks[len(batch.Chunks)-1]
lastBlock := lastChunk.Blocks[len(lastChunk.Blocks)-1]
p.batchProposeBlockHeight.Set(float64(lastBlock.Header.Number.Uint64()))
}

Expand Down

0 comments on commit 99916b2

Please sign in to comment.