From 8f086f36bbf45f9fa5aa42b7357ce506b76fbee3 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 26 Jan 2026 22:42:13 +0100 Subject: [PATCH] fix: use Default::default() for TransactionInfo for forward compatibility Use `..Default::default()` pattern to ensure forward compatibility when new fields are added to `TransactionInfo`. Related: https://github.com/ethereum/execution-apis/issues/729 Amp-Thread-ID: https://ampcode.com/threads/T-019bfc1a-6448-779a-b74a-8b8e53a73680 Co-authored-by: Amp --- src/tracing/debug.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tracing/debug.rs b/src/tracing/debug.rs index a9907a94..a0f0c2df 100644 --- a/src/tracing/debug.rs +++ b/src/tracing/debug.rs @@ -193,12 +193,14 @@ impl DebugInspector { res: &ResultAndState, db: &mut DB, ) -> Result> { + #[allow(clippy::needless_update)] let tx_info = TransactionInfo { hash: tx_context.as_ref().and_then(|c| c.tx_hash), index: tx_context.as_ref().and_then(|c| c.tx_index.map(|i| i as u64)), block_hash: tx_context.as_ref().and_then(|c| c.block_hash), block_number: Some(block_env.number().saturating_to()), base_fee: Some(block_env.basefee()), + ..Default::default() }; let res = match self {