Skip to content

Commit

Permalink
minor edit
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Nov 29, 2024
1 parent 6003c2e commit 5616aba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func (m *Manager) CreateAndSubmitBatch(maxSizeBytes uint64, lastBatch bool) (*ty
if err != nil {
return nil, fmt.Errorf("create batch: %w", err)
}

// This is the last batch, so we need to mark it as such
if lastBatch && b.EndHeight() == endHeightInclusive {
b.LastBatch = true
Expand Down Expand Up @@ -223,6 +222,7 @@ func (m *Manager) CreateBatch(maxBatchSize uint64, startHeight uint64, endHeight

totalSize := batch.SizeBytes()
if maxBatchSize < uint64(totalSize) { //nolint:gosec // size is always positive and falls in uint64

// Remove the last block and commit from the batch
batch.Blocks = batch.Blocks[:len(batch.Blocks)-1]
batch.Commits = batch.Commits[:len(batch.Commits)-1]
Expand Down

0 comments on commit 5616aba

Please sign in to comment.