From 68f8ccf8be6244f77f2cc1d06536e148ca26a1e8 Mon Sep 17 00:00:00 2001 From: refcell Date: Wed, 29 May 2024 11:44:28 -0400 Subject: [PATCH 1/3] fix: error types --- crates/primitives/src/system_config.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/primitives/src/system_config.rs b/crates/primitives/src/system_config.rs index 13ba73eaa..24a100e79 100644 --- a/crates/primitives/src/system_config.rs +++ b/crates/primitives/src/system_config.rs @@ -73,12 +73,14 @@ impl SystemConfig { !topics.is_empty() && topics[0] == CONFIG_UPDATE_TOPIC { - self.process_config_update_log(log, rollup_config, l1_time)?; + if let Err(e) = self.process_config_update_log(log, rollup_config, l1_time) { + anyhow::bail!("Failed to process config update log: {:?}", e); + } } - Ok(()) + Ok::<(), anyhow::Error>(()) })?; } - Ok(()) + Ok::<(), anyhow::Error>(()) } /// Decodes an EVM log entry emitted by the system config contract and applies it as a From defabcee579fde6a1be2168ef7d66c8d002187b2 Mon Sep 17 00:00:00 2001 From: refcell Date: Wed, 29 May 2024 11:46:04 -0400 Subject: [PATCH 2/3] fix: error types --- crates/primitives/src/block_info.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/primitives/src/block_info.rs b/crates/primitives/src/block_info.rs index 053f7117e..77a87bf8a 100644 --- a/crates/primitives/src/block_info.rs +++ b/crates/primitives/src/block_info.rs @@ -129,7 +129,7 @@ impl L1BlockInfoTx { let scalar = system_config.l1_fee_scalar.to_be_bytes::<32>(); let blob_base_fee_scalar = (scalar[0] == L1_SCALAR_ECOTONE) .then(|| { - Ok(u32::from_be_bytes( + Ok::(u32::from_be_bytes( scalar[24..28] .try_into() .map_err(|_| anyhow!("Failed to parse L1 blob base fee scalar"))?, From 65709b8c697d83ab934b3f6ecc64baee9c301958 Mon Sep 17 00:00:00 2001 From: refcell Date: Wed, 29 May 2024 11:47:11 -0400 Subject: [PATCH 3/3] fix: channel error typing --- crates/derive/src/types/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/derive/src/types/channel.rs b/crates/derive/src/types/channel.rs index 671e182f7..0f719f52e 100644 --- a/crates/derive/src/types/channel.rs +++ b/crates/derive/src/types/channel.rs @@ -136,7 +136,7 @@ impl Channel { (0..=self.last_frame_number).try_for_each(|i| { let frame = self.inputs.get(&i).ok_or_else(|| anyhow!("Frame not found"))?; data.extend_from_slice(&frame.data); - Ok(()) + Ok::<(), anyhow::Error>(()) })?; Ok(data.into()) }