From 293a3b01f28b9e252c9248b85695928f0df267f5 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 28 Aug 2024 00:02:24 +0200 Subject: [PATCH 1/2] Fix bug, empty receipts for block not counted by file client --- crates/optimism/cli/src/commands/import_receipts.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/optimism/cli/src/commands/import_receipts.rs b/crates/optimism/cli/src/commands/import_receipts.rs index cf3f6cf0de27..11b5667ff056 100644 --- a/crates/optimism/cli/src/commands/import_receipts.rs +++ b/crates/optimism/cli/src/commands/import_receipts.rs @@ -216,9 +216,6 @@ where debug_assert!(genesis_receipts.is_empty()); // this ensures the execution outcome and static file producer start at block 1 first_block = 1; - // we don't count this as decoded so the partial import check later does not error if - // this branch is executed - total_decoded_receipts -= 1; // safe because chunk will be `None` if empty } // We're reusing receipt writing code internal to From 19f2ac5a2702bc10ec097618b57e4017a7c37b84 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 28 Aug 2024 13:08:42 +0200 Subject: [PATCH 2/2] Remove redundant debug statement --- crates/net/downloaders/src/file_client.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/net/downloaders/src/file_client.rs b/crates/net/downloaders/src/file_client.rs index eaf39267755f..c0d03702a94a 100644 --- a/crates/net/downloaders/src/file_client.rs +++ b/crates/net/downloaders/src/file_client.rs @@ -398,7 +398,6 @@ impl ChunkedFileReader { T: FromReader, { if self.file_byte_len == 0 && self.chunk.is_empty() { - dbg!(self.chunk.is_empty()); // eof return Ok(None) }