pub struct ValidatorSet {
pub utime_since: u32,
pub utime_until: u32,
pub main: NonZeroU16,
pub total_weight: u64,
pub list: Vec<ValidatorDescription>,
}Expand description
Validator set.
Fields§
§utime_since: u32Unix timestamp from which this set will be active.
utime_until: u32Unix timestamp until which this set will be active.
main: NonZeroU16The number of masterchain validators.
total_weight: u64Total validators weight.
list: Vec<ValidatorDescription>Validators.
Implementations§
Source§impl ValidatorSet
impl ValidatorSet
Sourcepub fn compute_subset(
&self,
shard_ident: ShardIdent,
cc_config: &CatchainConfig,
cc_seqno: u32,
) -> Option<(Vec<ValidatorDescription>, u32)>
pub fn compute_subset( &self, shard_ident: ShardIdent, cc_config: &CatchainConfig, cc_seqno: u32, ) -> Option<(Vec<ValidatorDescription>, u32)>
Computes a validator subset using a zero seed.
Sourcepub fn compute_mc_subset(
&self,
cc_seqno: u32,
shuffle: bool,
) -> Option<(Vec<ValidatorDescription>, u32)>
pub fn compute_mc_subset( &self, cc_seqno: u32, shuffle: bool, ) -> Option<(Vec<ValidatorDescription>, u32)>
Computes a masterchain validator subset using a zero seed.
NOTE: In most cases you should use the more generic ValidatorSet::compute_subset.
Sourcepub fn compute_subset_hash_short(
subset: &[ValidatorDescription],
cc_seqno: u32,
) -> u32
pub fn compute_subset_hash_short( subset: &[ValidatorDescription], cc_seqno: u32, ) -> u32
Compoutes a validator subset short hash.
Trait Implementations§
Source§impl Clone for ValidatorSet
impl Clone for ValidatorSet
Source§fn clone(&self) -> ValidatorSet
fn clone(&self) -> ValidatorSet
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidatorSet
impl Debug for ValidatorSet
Source§impl<'de> Deserialize<'de> for ValidatorSet
impl<'de> Deserialize<'de> for ValidatorSet
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Load<'a> for ValidatorSet
impl<'a> Load<'a> for ValidatorSet
Source§impl PartialEq for ValidatorSet
impl PartialEq for ValidatorSet
Source§impl Serialize for ValidatorSet
impl Serialize for ValidatorSet
Source§impl Store for ValidatorSet
impl Store for ValidatorSet
Source§fn store_into(
&self,
builder: &mut CellBuilder,
context: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, builder: &mut CellBuilder, context: &dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for ValidatorSet
impl StructuralPartialEq for ValidatorSet
Auto Trait Implementations§
impl Freeze for ValidatorSet
impl RefUnwindSafe for ValidatorSet
impl Send for ValidatorSet
impl Sync for ValidatorSet
impl Unpin for ValidatorSet
impl UnwindSafe for ValidatorSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self to key and returns true if they are equal.