Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirko-von-Leipzig committed Oct 29, 2024
1 parent 7f7f6db commit f05cde5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/block-producer/src/mempool/dependency_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ use miden_tx::utils::collections::KvMap;
/// once all parent nodes have been processed.
///
/// Forms the basis of our transaction and batch dependency graphs.
///
/// # Node lifecycle
/// ```
/// ```
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DependencyGraph<K, V> {
/// Node's who's data is still pending.
Expand Down Expand Up @@ -122,7 +126,7 @@ impl<K: Ord + Copy + Display + std::fmt::Debug, V: Clone> DependencyGraph<K, V>
return Err(GraphError::InvalidPendingNode(key));
}

self.vertices.insert(key.clone(), value);
self.vertices.insert(key, value);
self.try_make_root(key);

Ok(())
Expand Down Expand Up @@ -167,10 +171,10 @@ impl<K: Ord + Copy + Display + std::fmt::Debug, V: Clone> DependencyGraph<K, V>
.into_iter()
.flatten()
// We should not revert children which are pending.
.filter(|child| self.vertices.contains_key(&child))
.filter(|child| self.vertices.contains_key(child))
.copied();

to_revert.extend(dbg!(unprocessed_children));
to_revert.extend(unprocessed_children);

reverted.insert(key);
}
Expand Down

0 comments on commit f05cde5

Please sign in to comment.