pub struct MetaBlock {Show 25 fields
pub nonce: u64,
pub epoch: u32,
pub round: u64,
pub time_stamp: u64,
pub shard_info: Vec<ShardData>,
pub peer_info: Vec<PeerData>,
pub signature: Bytes,
pub leader_signature: Bytes,
pub pub_keys_bitmap: Bytes,
pub prev_hash: Bytes,
pub prev_rand_seed: Bytes,
pub rand_seed: Bytes,
pub root_hash: Bytes,
pub validator_stats_root_hash: Bytes,
pub mini_block_headers: Vec<MiniBlockHeader>,
pub receipts_hash: Bytes,
pub epoch_start: Option<EpochStart>,
pub chain_id: Bytes,
pub software_version: Bytes,
pub accumulated_fees: Bytes,
pub accumulated_fees_in_epoch: Bytes,
pub developer_fees: Bytes,
pub dev_fees_in_epoch: Bytes,
pub tx_count: u32,
pub reserved: Bytes,
}Expand description
MetaBlock holds the data that will be saved to the metachain each round
Fields§
§nonce: u64§epoch: u32§round: u64§time_stamp: u64§shard_info: Vec<ShardData>§peer_info: Vec<PeerData>§signature: Bytes§leader_signature: Bytes§pub_keys_bitmap: Bytes§prev_hash: Bytes§prev_rand_seed: Bytes§rand_seed: Bytes§root_hash: Bytes§validator_stats_root_hash: Bytes§mini_block_headers: Vec<MiniBlockHeader>§receipts_hash: Bytes§epoch_start: Option<EpochStart>§chain_id: Bytes§software_version: Bytes§accumulated_fees: Bytes§accumulated_fees_in_epoch: Bytes§developer_fees: Bytes§dev_fees_in_epoch: Bytes§tx_count: u32§reserved: BytesTrait Implementations§
Source§impl Message for MetaBlock
impl Message for MetaBlock
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 MetaBlock
Auto Trait Implementations§
impl !Freeze for MetaBlock
impl RefUnwindSafe for MetaBlock
impl Send for MetaBlock
impl Sync for MetaBlock
impl Unpin for MetaBlock
impl UnsafeUnpin for MetaBlock
impl UnwindSafe for MetaBlock
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