Struct cosmos_sdk_proto::cosmos::staking::v1beta1::Validator[][src]

pub struct Validator {
    pub operator_address: String,
    pub consensus_pubkey: Option<Any>,
    pub jailed: bool,
    pub status: i32,
    pub tokens: String,
    pub delegator_shares: String,
    pub description: Option<Description>,
    pub unbonding_height: i64,
    pub unbonding_time: Option<Timestamp>,
    pub commission: Option<Commission>,
    pub min_self_delegation: String,
}

Validator defines a validator, together with the total amount of the Validator’s bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate.

Fields

operator_address: String

operator_address defines the address of the validator’s operator; bech encoded in JSON.

consensus_pubkey: Option<Any>

consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.

jailed: bool

jailed defined whether the validator has been jailed from bonded status or not.

status: i32

status is the validator status (bonded/unbonding/unbonded).

tokens: String

tokens define the delegated tokens (incl. self-delegation).

delegator_shares: String

delegator_shares defines total shares issued to a validator’s delegators.

description: Option<Description>

description defines the description terms for the validator.

unbonding_height: i64

unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.

unbonding_time: Option<Timestamp>

unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.

commission: Option<Commission>

commission defines the commission parameters.

min_self_delegation: String

min_self_delegation is the validator’s self declared minimum self delegation.

Implementations

impl Validator[src]

pub fn status(&self) -> BondStatus[src]

Returns the enum value of status, or the default if the field is set to an invalid enum value.

pub fn set_status(&mut self, value: BondStatus)[src]

Sets status to the provided enum value.

Trait Implementations

impl Clone for Validator[src]

impl Debug for Validator[src]

impl Default for Validator[src]

impl Message for Validator[src]

impl PartialEq<Validator> for Validator[src]

impl StructuralPartialEq for Validator[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]