From 84ca7d26b0a4708f2496914762bf9109f8351628 Mon Sep 17 00:00:00 2001 From: Guy Nir Date: Sun, 8 Dec 2024 10:10:54 +0200 Subject: [PATCH] chore(sequencing): remove ProposalChunk --- crates/sequencing/papyrus_consensus/src/manager_test.rs | 1 - crates/sequencing/papyrus_consensus/src/test_utils.rs | 1 - crates/sequencing/papyrus_consensus/src/types.rs | 1 - .../src/papyrus_consensus_context.rs | 1 - .../src/sequencer_consensus_context.rs | 1 - 5 files changed, 5 deletions(-) diff --git a/crates/sequencing/papyrus_consensus/src/manager_test.rs b/crates/sequencing/papyrus_consensus/src/manager_test.rs index d393627ac9e..8ac562f464d 100644 --- a/crates/sequencing/papyrus_consensus/src/manager_test.rs +++ b/crates/sequencing/papyrus_consensus/src/manager_test.rs @@ -45,7 +45,6 @@ mock! { #[async_trait] impl ConsensusContext for TestContext { - type ProposalChunk = Transaction; type ProposalPart = ProposalPart; async fn build_proposal( diff --git a/crates/sequencing/papyrus_consensus/src/test_utils.rs b/crates/sequencing/papyrus_consensus/src/test_utils.rs index ae5a840cb7b..3c92c60631a 100644 --- a/crates/sequencing/papyrus_consensus/src/test_utils.rs +++ b/crates/sequencing/papyrus_consensus/src/test_utils.rs @@ -58,7 +58,6 @@ mock! { #[async_trait] impl ConsensusContext for TestContext { - type ProposalChunk = u32; type ProposalPart = MockProposalPart; async fn build_proposal( diff --git a/crates/sequencing/papyrus_consensus/src/types.rs b/crates/sequencing/papyrus_consensus/src/types.rs index becc800fd95..8b6411cc37d 100644 --- a/crates/sequencing/papyrus_consensus/src/types.rs +++ b/crates/sequencing/papyrus_consensus/src/types.rs @@ -29,7 +29,6 @@ pub trait ConsensusContext { /// The chunks of content returned when iterating the proposal. // In practice I expect this to match the type sent to the network // (papyrus_protobuf::ConsensusMessage), and not to be specific to just the block's content. - type ProposalChunk; // TODO(guyn): deprecate this (and replace by ProposalPart) type ProposalPart: TryFrom, Error = ProtobufConversionError> + Into> + TryInto diff --git a/crates/sequencing/papyrus_consensus_orchestrator/src/papyrus_consensus_context.rs b/crates/sequencing/papyrus_consensus_orchestrator/src/papyrus_consensus_context.rs index ed3acb19b73..ff1ae68828e 100644 --- a/crates/sequencing/papyrus_consensus_orchestrator/src/papyrus_consensus_context.rs +++ b/crates/sequencing/papyrus_consensus_orchestrator/src/papyrus_consensus_context.rs @@ -79,7 +79,6 @@ impl PapyrusConsensusContext { #[async_trait] impl ConsensusContext for PapyrusConsensusContext { - type ProposalChunk = Transaction; type ProposalPart = ProposalPart; async fn build_proposal( 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 dfe48a31c89..55396ab8f19 100644 --- a/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs +++ b/crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs @@ -132,7 +132,6 @@ impl SequencerConsensusContext { #[async_trait] impl ConsensusContext for SequencerConsensusContext { // TODO(guyn): Switch to ProposalPart when done with the streaming integration. - type ProposalChunk = Vec; type ProposalPart = ProposalPart; async fn build_proposal(