From b63149a26e151f7cc43896c0b5804b89380a42ed Mon Sep 17 00:00:00 2001 From: Arni Hod Date: Tue, 26 Nov 2024 17:01:42 +0200 Subject: [PATCH] chore(starknet_batcher): add height as input --- .../src/sequencer_consensus_context.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs b/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs index 988542c705..c4cc55e343 100644 --- a/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs +++ b/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs @@ -28,7 +28,7 @@ use papyrus_protobuf::consensus::{ TransactionBatch, Vote, }; -use starknet_api::block::{BlockHash, BlockHashAndNumber, BlockNumber}; +use starknet_api::block::{BlockHash, BlockHashAndNumber, BlockInfo, BlockNumber}; use starknet_api::executable_transaction::Transaction; use starknet_batcher_types::batcher_types::{ DecisionReachedInput, @@ -140,7 +140,7 @@ impl ConsensusContext for SequencerConsensusContext { hash: BlockHash::default(), }), // TODO(Dan, Matan): Fill block info. - block_info: Default::default(), + block_info: BlockInfo { block_number: proposal_init.height, ..Default::default() }, }; // TODO: Should we be returning an error? // I think this implies defining an error type in this crate and moving the trait definition @@ -323,7 +323,7 @@ impl SequencerConsensusContext { hash: BlockHash::default(), }), // TODO(Dan, Matan): Fill block info. - block_info: Default::default(), + block_info: BlockInfo { block_number: height, ..Default::default() }, }; batcher.validate_block(input).await.expect("Failed to initiate proposal validation");