From d1c3544585bea3ae878358d4fc0f84b2496c8e15 Mon Sep 17 00:00:00 2001 From: Dori Medini Date: Tue, 14 Jan 2025 17:55:58 +0200 Subject: [PATCH] fix(starknet_batcher): fix for feature combo build Signed-off-by: Dori Medini --- crates/starknet_batcher/src/block_builder.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/starknet_batcher/src/block_builder.rs b/crates/starknet_batcher/src/block_builder.rs index 5f79647411..56a044bac3 100644 --- a/crates/starknet_batcher/src/block_builder.rs +++ b/crates/starknet_batcher/src/block_builder.rs @@ -235,7 +235,9 @@ async fn collect_execution_results_and_stream_txs( for (input_tx, result) in tx_chunk.into_iter().zip(results.into_iter()) { match result { Ok(tx_execution_info) => { - *l2_gas_used += tx_execution_info.receipt.gas.l2_gas; + *l2_gas_used = l2_gas_used + .checked_add(tx_execution_info.receipt.gas.l2_gas) + .expect("Total L2 gas overflowed."); execution_infos.insert(input_tx.tx_hash(), tx_execution_info); if let Some(output_content_sender) = output_content_sender { output_content_sender.send(input_tx)?;