Skip to content

Commit

Permalink
disambiguate Membership
Browse files Browse the repository at this point in the history
  • Loading branch information
tbro committed Dec 9, 2024
1 parent ef90df4 commit ffe9c54
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions sequencer/src/api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::pin::Pin;

use anyhow::{bail, Context};
use async_lock::RwLock;
use async_once_cell::Lazy;
Expand All @@ -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},
Expand All @@ -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::{
Expand Down Expand Up @@ -188,12 +187,10 @@ impl<N: ConnectedNetwork<PubKey>, V: Versions, P: SequencerPersistence>
self.consensus().await.read().await.cur_epoch().await
};

self.consensus()
.await
.read()
.await
.memberships
.stake_table(epoch)
<StaticCommittee as Membership<SeqTypes>>::stake_table(
&self.consensus().await.read().await.memberships,
epoch,
)
}
}

Expand Down

0 comments on commit ffe9c54

Please sign in to comment.