pub struct BlockMetadata {
pub gas_used: u64,
pub gas_limit: u64,
pub tx_count: u64,
pub protocol_version: u32,
pub base_fee_per_gas: Option<u128>,
}Expand description
Additional metadata included in a block header
Fields§
§gas_used: u64Total gas used in this block
gas_limit: u64Gas limit for this block
tx_count: u64Number of transactions in this block
protocol_version: u32Protocol version
base_fee_per_gas: Option<u128>EIP-1559 base fee per gas for this block, in wei-equivalent (TNZO base units / 10^18).
Stamped at block-finalize time from the live FeeMarket. This is the
minimum gas price that any transaction in this block had to bid; the
portion of effective gas price equal to this is burned. eth_feeHistory
reads this field directly per block, so it must be persisted with the
block header rather than reconstructed from the runtime fee market
(which only retains a bounded recent window).
None for genesis and any block produced before EIP-1559 wiring; new
blocks always carry Some(_).
Trait Implementations§
Source§impl Clone for BlockMetadata
impl Clone for BlockMetadata
Source§fn clone(&self) -> BlockMetadata
fn clone(&self) -> BlockMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockMetadata
impl Debug for BlockMetadata
Source§impl Default for BlockMetadata
impl Default for BlockMetadata
Source§fn default() -> BlockMetadata
fn default() -> BlockMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlockMetadata
impl<'de> Deserialize<'de> for BlockMetadata
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 Eq for BlockMetadata
Source§impl PartialEq for BlockMetadata
impl PartialEq for BlockMetadata
Source§fn eq(&self, other: &BlockMetadata) -> bool
fn eq(&self, other: &BlockMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BlockMetadata
impl Serialize for BlockMetadata
impl StructuralPartialEq for BlockMetadata
Auto Trait Implementations§
impl Freeze for BlockMetadata
impl RefUnwindSafe for BlockMetadata
impl Send for BlockMetadata
impl Sync for BlockMetadata
impl Unpin for BlockMetadata
impl UnsafeUnpin for BlockMetadata
impl UnwindSafe for BlockMetadata
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