From ffe9c54f93d5c86bc3970446f2946eefd4499266 Mon Sep 17 00:00:00 2001 From: tbro Date: Mon, 9 Dec 2024 18:50:30 -0300 Subject: [PATCH] disambiguate Membership --- sequencer/src/api.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sequencer/src/api.rs b/sequencer/src/api.rs index 12f8191e2..6d0c2c862 100644 --- a/sequencer/src/api.rs +++ b/sequencer/src/api.rs @@ -1,5 +1,3 @@ -use std::pin::Pin; - use anyhow::{bail, Context}; use async_lock::RwLock; use async_once_cell::Lazy; @@ -9,8 +7,8 @@ use data_source::{CatchupDataSource, StakeTableDataSource, SubmitDataSource}; use derivative::Derivative; use espresso_types::{ retain_accounts, v0::traits::SequencerPersistence, v0_99::ChainConfig, AccountQueryData, - BlockMerkleTree, FeeAccount, FeeAccountProof, FeeMerkleTree, NodeState, PubKey, Transaction, - ValidatedState, + BlockMerkleTree, FeeAccount, FeeAccountProof, FeeMerkleTree, NodeState, PubKey, + StaticCommittee, Transaction, ValidatedState, }; use futures::{ future::{BoxFuture, Future, FutureExt}, @@ -34,6 +32,7 @@ use hotshot_types::{ }; use hotshot_types::{stake_table::StakeTableEntry, traits::election::Membership}; use jf_merkle_tree::MerkleTreeScheme; +use std::pin::Pin; use std::sync::Arc; use self::data_source::{ @@ -188,12 +187,10 @@ impl, V: Versions, P: SequencerPersistence> self.consensus().await.read().await.cur_epoch().await }; - self.consensus() - .await - .read() - .await - .memberships - .stake_table(epoch) + >::stake_table( + &self.consensus().await.read().await.memberships, + epoch, + ) } }