From d504085fcc599c97b362ccdb1addfafb4b5b73b0 Mon Sep 17 00:00:00 2001 From: Mirko von Leipzig Date: Fri, 6 Dec 2024 13:55:38 +0200 Subject: [PATCH] Review: fix up batch graph comments --- crates/block-producer/src/mempool/batch_graph.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/block-producer/src/mempool/batch_graph.rs b/crates/block-producer/src/mempool/batch_graph.rs index ec8152b1..62b4c568 100644 --- a/crates/block-producer/src/mempool/batch_graph.rs +++ b/crates/block-producer/src/mempool/batch_graph.rs @@ -135,7 +135,7 @@ impl BatchGraph { /// /// # Returns /// - /// Returns all removes batches and their transactions. + /// Returns all removed batches and their transactions. /// /// # Errors /// @@ -185,6 +185,8 @@ impl BatchGraph { &mut self, batch_ids: BTreeSet, ) -> Result, GraphError> { + // This clone could be elided by moving this call to the end. This would lose the atomic + // property of this method though its unclear what value (if any) that has. self.inner.prune_processed(batch_ids.clone())?; let mut transactions = Vec::new();