diff --git a/crates/starknet_batcher/src/batcher.rs b/crates/starknet_batcher/src/batcher.rs index f0c9b13181d..9f47cbc3d2d 100644 --- a/crates/starknet_batcher/src/batcher.rs +++ b/crates/starknet_batcher/src/batcher.rs @@ -115,10 +115,7 @@ impl Batcher { }); } - // Clear all the proposals from the previous height. - self.proposal_manager.reset().await; - self.propose_tx_streams.clear(); - self.validate_tx_streams.clear(); + self.clear_previous_proposals().await; info!("Starting to work on height {}.", input.height); self.active_height = Some(input.height); @@ -237,6 +234,13 @@ impl Batcher { } } + /// Clear all the proposals from the previous height. + async fn clear_previous_proposals(&mut self) { + self.proposal_manager.reset().await; + self.propose_tx_streams.clear(); + self.validate_tx_streams.clear(); + } + async fn handle_send_txs_request( &mut self, proposal_id: ProposalId,