pub struct State {Show 14 fields
pub version: Option<Version>,
pub chain_id: String,
pub initial_height: i64,
pub last_block_height: i64,
pub last_block_id: Option<BlockId>,
pub last_block_time: Option<Timestamp>,
pub next_validators: Option<ValidatorSet>,
pub validators: Option<ValidatorSet>,
pub last_validators: Option<ValidatorSet>,
pub last_height_validators_changed: i64,
pub consensus_params: Option<ConsensusParams>,
pub last_height_consensus_params_changed: i64,
pub last_results_hash: Vec<u8>,
pub app_hash: Vec<u8>,
}Fields§
§version: Option<Version>§chain_id: Stringimmutable
initial_height: i64§last_block_height: i64LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
last_block_id: Option<BlockId>§last_block_time: Option<Timestamp>§next_validators: Option<ValidatorSet>LastValidators is used to validate block.LastCommit. Validators are persisted to the database separately every time they change, so we can query for historical validator sets. Note that if s.LastBlockHeight causes a valset change, we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 Extra +1 due to nextValSet delay.
validators: Option<ValidatorSet>§last_validators: Option<ValidatorSet>§last_height_validators_changed: i64§consensus_params: Option<ConsensusParams>Consensus parameters used for validating blocks. Changes returned by EndBlock and updated after Commit.
last_height_consensus_params_changed: i64§last_results_hash: Vec<u8>Merkle root of the results from executing prev block
app_hash: Vec<u8>the latest AppHash we’ve received from calling abci.Commit()
Trait Implementations§
Source§impl Message for State
impl Message for State
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request