Skip to content

Commit

Permalink
refactor: remove async fun from create (#167)
Browse files Browse the repository at this point in the history
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/starkware-libs/sequencer/167)
<!-- Reviewable:end -->
  • Loading branch information
AvivYossef-starkware authored Aug 5, 2024
1 parent 516f0ce commit ff11dd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::collections::HashMap;
use std::future::Future;
use std::sync::{Arc, Mutex};

use async_recursion::async_recursion;
Expand Down Expand Up @@ -26,10 +27,10 @@ pub(crate) type FilledTreeResult<T, L> = Result<T, FilledTreeError<L>>;
/// data and hashes.
pub(crate) trait FilledTree<L: Leaf>: Sized {
/// Computes and returns the filled tree.
async fn create<'a, TH: TreeHashFunction<L> + 'static>(
fn create<'a, TH: TreeHashFunction<L> + 'static>(
updated_skeleton: Arc<impl UpdatedSkeletonTree<'a> + 'static>,
leaf_modifications: Arc<LeafModifications<L>>,
) -> FilledTreeResult<Self, L>;
) -> impl Future<Output = FilledTreeResult<Self, L>> + Send;

/// Serializes the current state of the tree into a hashmap,
/// where each key-value pair corresponds
Expand Down

0 comments on commit ff11dd7

Please sign in to comment.