diff --git a/crates/starknet_batcher/src/batcher.rs b/crates/starknet_batcher/src/batcher.rs index b95b945c9b..239ac75e47 100644 --- a/crates/starknet_batcher/src/batcher.rs +++ b/crates/starknet_batcher/src/batcher.rs @@ -112,10 +112,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); @@ -234,6 +231,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,