Skip to content

Commit

Permalink
chore: rename proposal init and add log
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-starkware committed Nov 5, 2024
1 parent 81eb477 commit c27ce71
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ impl ConsensusContext for SequencerConsensusContext {

async fn build_proposal(
&mut self,
init: ProposalInit,
proposal_init: ProposalInit,
timeout: Duration,
) -> oneshot::Receiver<ProposalContentId> {
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);
Expand All @@ -100,18 +103,19 @@ 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
.expect("Failed to initiate proposal build");
tokio::spawn(
async move {
stream_build_proposal(
init.height,
proposal_init.height,
proposal_id,
batcher,
valid_proposals,
Expand Down

0 comments on commit c27ce71

Please sign in to comment.