pub trait TestStakeTable<PubKey: SignatureKey, StatePubKey: StateSignatureKey + LCV1StateSignatureKey + LCV2StateSignatureKey + LCV3StateSignatureKey>:
Clone
+ Debug
+ Send
+ Sync {
Show 16 methods
// Required methods
fn new(
quorum_members: Vec<TestStakeTableEntry<PubKey, StatePubKey>>,
da_members: Vec<TestStakeTableEntry<PubKey, StatePubKey>>,
) -> Self;
fn stake_table(
&self,
epoch: Option<u64>,
) -> Vec<TestStakeTableEntry<PubKey, StatePubKey>>;
fn full_stake_table(&self) -> Vec<TestStakeTableEntry<PubKey, StatePubKey>>;
fn da_stake_table(
&self,
epoch: Option<u64>,
) -> Vec<TestStakeTableEntry<PubKey, StatePubKey>>;
fn lookup_leader(
&self,
view_number: u64,
epoch: Option<u64>,
) -> Result<PubKey>;
fn has_stake_table(&self, epoch: u64) -> bool;
fn has_randomized_stake_table(&self, epoch: u64) -> Result<bool>;
fn add_epoch_root(&mut self, epoch: u64);
fn add_drb_result(&mut self, epoch: u64, drb_result: DrbResult);
fn set_first_epoch(&mut self, epoch: u64, initial_drb_result: DrbResult);
fn first_epoch(&self) -> Option<u64>;
fn get_epoch_drb(&self, epoch: u64) -> Result<DrbResult>;
fn add_da_committee(
&mut self,
first_epoch: u64,
committee: Vec<TestStakeTableEntry<PubKey, StatePubKey>>,
);
// Provided methods
fn stake(
&self,
pub_key: PubKey,
epoch: Option<u64>,
) -> Option<TestStakeTableEntry<PubKey, StatePubKey>> { ... }
fn da_stake(
&self,
pub_key: PubKey,
epoch: Option<u64>,
) -> Option<TestStakeTableEntry<PubKey, StatePubKey>> { ... }
fn add_quorum_committee(
&mut self,
_first_epoch: u64,
_committee: Vec<TestStakeTableEntry<PubKey, StatePubKey>>,
) { ... }
}Required Methods§
fn new( quorum_members: Vec<TestStakeTableEntry<PubKey, StatePubKey>>, da_members: Vec<TestStakeTableEntry<PubKey, StatePubKey>>, ) -> Self
fn stake_table( &self, epoch: Option<u64>, ) -> Vec<TestStakeTableEntry<PubKey, StatePubKey>>
fn full_stake_table(&self) -> Vec<TestStakeTableEntry<PubKey, StatePubKey>>
fn da_stake_table( &self, epoch: Option<u64>, ) -> Vec<TestStakeTableEntry<PubKey, StatePubKey>>
fn lookup_leader(&self, view_number: u64, epoch: Option<u64>) -> Result<PubKey>
fn has_stake_table(&self, epoch: u64) -> bool
fn has_randomized_stake_table(&self, epoch: u64) -> Result<bool>
fn add_epoch_root(&mut self, epoch: u64)
fn add_drb_result(&mut self, epoch: u64, drb_result: DrbResult)
fn set_first_epoch(&mut self, epoch: u64, initial_drb_result: DrbResult)
fn first_epoch(&self) -> Option<u64>
fn get_epoch_drb(&self, epoch: u64) -> Result<DrbResult>
fn add_da_committee( &mut self, first_epoch: u64, committee: Vec<TestStakeTableEntry<PubKey, StatePubKey>>, )
Provided Methods§
fn stake( &self, pub_key: PubKey, epoch: Option<u64>, ) -> Option<TestStakeTableEntry<PubKey, StatePubKey>>
fn da_stake( &self, pub_key: PubKey, epoch: Option<u64>, ) -> Option<TestStakeTableEntry<PubKey, StatePubKey>>
Sourcefn add_quorum_committee(
&mut self,
_first_epoch: u64,
_committee: Vec<TestStakeTableEntry<PubKey, StatePubKey>>,
)
fn add_quorum_committee( &mut self, _first_epoch: u64, _committee: Vec<TestStakeTableEntry<PubKey, StatePubKey>>, )
Register a quorum committee effective from first_epoch (inclusive).
Mirrors add_da_committee; implementations without per-epoch quorum
committees keep the panicking default.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.