Type Definition themelio_stf::StakeMapping
source · pub type StakeMapping<C> = SmtMapping<C, TxHash, StakeDoc>;
Expand description
A stake mapping
Implementations
sourceimpl<C: ContentAddrStore> StakeMapping<C>
impl<C: ContentAddrStore> StakeMapping<C>
sourcepub fn vote_power(&self, epoch: u64, pubkey: Ed25519PK) -> f64
pub fn vote_power(&self, epoch: u64, pubkey: Ed25519PK) -> f64
Gets the voting power, as a floating-point number, for a given public key and a given epoch.
sourcepub fn remove_stale(&mut self, epoch: u64)
pub fn remove_stale(&mut self, epoch: u64)
Filter out all the elements that no longer matter.