From 4acaf025b3a537a3964d3fd22f8e38aa4e3acbbc Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Wed, 11 Mar 2026 02:20:50 +0000 Subject: [PATCH] refactor(kona/derive): rename blob_index to filled_blobs in BlobSource Rename the `blob_index` variable in `load_blobs` to `filled_blobs` for clarity, as the variable tracks the number of blob placeholders that were filled rather than serving as a traditional index. Addresses review feedback from optimism#19364. Co-Authored-By: Claude Opus 4.6 --- rust/kona/crates/protocol/derive/src/sources/blobs.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/kona/crates/protocol/derive/src/sources/blobs.rs b/rust/kona/crates/protocol/derive/src/sources/blobs.rs index 1304367725f20..bb036f519000e 100644 --- a/rust/kona/crates/protocol/derive/src/sources/blobs.rs +++ b/rust/kona/crates/protocol/derive/src/sources/blobs.rs @@ -163,13 +163,13 @@ where })?; // Fill the blob pointers. - let mut blob_index = 0; + let mut filled_blobs = 0; for blob in &mut data { let should_increment = blob - .fill(&blobs, blob_index) + .fill(&blobs, filled_blobs) .map_err(|e| -> PipelineErrorKind { BlobProviderError::from(e).into() })?; if should_increment { - blob_index += 1; + filled_blobs += 1; } } @@ -178,9 +178,9 @@ where // from a clean state. Matches the check in `fillBlobPointers` in // blob_data_source.go which returns `fmt.Errorf("got too many blobs")` // wrapped as `NewResetError`. - if blob_index < blobs.len() { + if filled_blobs < blobs.len() { return Err( - ResetError::BlobsOverFill { filled: blob_index, returned: blobs.len() }.reset() + ResetError::BlobsOverFill { filled: filled_blobs, returned: blobs.len() }.reset() ); }