pub struct ValidatorDescription {
pub public_key: HashBytes,
pub weight: u64,
pub adnl_addr: Option<HashBytes>,
pub mc_seqno_since: u32,
pub prev_total_weight: u64,
}Expand description
Validator description.
Fields§
§public_key: HashBytesValidator public key.
weight: u64Validator weight in some units.
adnl_addr: Option<HashBytes>Optional validator ADNL address.
mc_seqno_since: u32Since which seqno this validator will be active.
prev_total_weight: u64Total weight of the previous validators in the list. The field is not serialized.
Implementations§
Source§impl ValidatorDescription
impl ValidatorDescription
Sourcepub fn verify_signature(&self, data: &[u8], signature: &Signature) -> bool
pub fn verify_signature(&self, data: &[u8], signature: &Signature) -> bool
Verifies message signature and current public key.
Trait Implementations§
Source§impl Clone for ValidatorDescription
impl Clone for ValidatorDescription
Source§fn clone(&self) -> ValidatorDescription
fn clone(&self) -> ValidatorDescription
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 ValidatorDescription
impl Debug for ValidatorDescription
Source§impl<'de> Deserialize<'de> for ValidatorDescription
impl<'de> Deserialize<'de> for ValidatorDescription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Load<'a> for ValidatorDescription
impl<'a> Load<'a> for ValidatorDescription
Source§impl PartialEq for ValidatorDescription
impl PartialEq for ValidatorDescription
Source§impl Serialize for ValidatorDescription
impl Serialize for ValidatorDescription
Source§impl Store for ValidatorDescription
impl Store for ValidatorDescription
Source§fn store_into(
&self,
builder: &mut CellBuilder,
_: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, builder: &mut CellBuilder, _: &dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for ValidatorDescription
impl StructuralPartialEq for ValidatorDescription
Auto Trait Implementations§
impl Freeze for ValidatorDescription
impl RefUnwindSafe for ValidatorDescription
impl Send for ValidatorDescription
impl Sync for ValidatorDescription
impl Unpin for ValidatorDescription
impl UnwindSafe for ValidatorDescription
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.