From 135c1790d70d4e3c0a7ca479776c9f8de89cd235 Mon Sep 17 00:00:00 2001 From: dan-starkware <56217775+dan-starkware@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:48:31 +0200 Subject: [PATCH] chore: rename proposal init and add log (#1807) --- .../src/sequencer_consensus_context.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 0e8f237027..cf59a159a5 100644 --- a/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs +++ b/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs @@ -77,10 +77,13 @@ impl ConsensusContext for SequencerConsensusContext { async fn build_proposal( &mut self, - init: ProposalInit, + proposal_init: ProposalInit, timeout: Duration, ) -> oneshot::Receiver { - debug!("Building proposal for height: {} with timeout: {:?}", init.height, timeout); + debug!( + "Building proposal for height: {} with timeout: {:?}", + proposal_init.height, timeout + ); let (fin_sender, fin_receiver) = oneshot::channel(); let batcher = Arc::clone(&self.batcher); @@ -100,10 +103,11 @@ impl ConsensusContext for SequencerConsensusContext { hash: BlockHash::default(), }), }; - self.maybe_start_height(init.height).await; + self.maybe_start_height(proposal_init.height).await; // TODO: Should we be returning an error? // I think this implies defining an error type in this crate and moving the trait definition // here also. + debug!("Initiating proposal build: {build_proposal_input:?}"); batcher .build_proposal(build_proposal_input) .await @@ -111,7 +115,7 @@ impl ConsensusContext for SequencerConsensusContext { tokio::spawn( async move { stream_build_proposal( - init.height, + proposal_init.height, proposal_id, batcher, valid_proposals,