pub struct BlockInfo {Show 17 fields
pub number: u32,
pub id: U256,
pub size: u32,
pub parent_id: U256,
pub timestamp: u32,
pub gas_limit: u32,
pub beneficiary: Address,
pub gas_used: u32,
pub total_score: u32,
pub txs_root: U256,
pub txs_features: u32,
pub state_root: U256,
pub receipts_root: U256,
pub is_trunk: bool,
pub is_finalized: bool,
pub com: bool,
pub signer: Address,
}
Expand description
A blockchain block.
Fields§
§number: u32
Block number (height)
id: U256
Block identifier
size: u32
RLP encoded block size in bytes
parent_id: U256
Parent block ID
timestamp: u32
Block unix timestamp
gas_limit: u32
Block gas limit (max allowed accumulative gas usage of transactions)
beneficiary: Address
Address of account to receive block reward
gas_used: u32
Accumulative gas usage of transactions
total_score: u32
Sum of all ancestral blocks’ score
txs_root: U256
Root hash of transactions in the block
txs_features: u32
Supported txs features bitset
state_root: U256
Root hash of accounts state
receipts_root: U256
Root hash of transaction receipts
is_trunk: bool
Is in trunk?
is_finalized: bool
Is finalized?
com: bool
Whether the block signer voted COM(Commit) in BFT
signer: Address
The one who signed this block
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BlockInfo
impl<'de> Deserialize<'de> for BlockInfo
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
impl StructuralPartialEq for BlockInfo
Auto Trait Implementations§
impl Freeze for BlockInfo
impl RefUnwindSafe for BlockInfo
impl Send for BlockInfo
impl Sync for BlockInfo
impl Unpin for BlockInfo
impl UnwindSafe for BlockInfo
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more