Skip to content

Commit

Permalink
chore: Update block.rs (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoTheBestToGetTheBest authored Dec 30, 2024
1 parent d37a286 commit 2d87a5a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,38 @@ impl<B: AlloyBlock> From<B> for RevmAlloyBlock<B> {
impl<B> RevmBlock for RevmAlloyBlock<B>
where
B: AlloyBlock,
{
{
#[inline]
fn number(&self) -> u64 {
self.0.number()
}

#[inline]
fn beneficiary(&self) -> Address {
self.0.beneficiary()
}

#[inline]
fn timestamp(&self) -> u64 {
self.0.timestamp()
}

#[doc = " The gas limit of the block."]
#[inline]
fn gas_limit(&self) -> u64 {
self.0.gas_limit()
}

#[inline]
fn basefee(&self) -> u64 {
self.0.base_fee_per_gas().unwrap_or(u64::MAX)
}

#[inline]
fn difficulty(&self) -> U256 {
self.0.difficulty()
}

#[inline]
fn prevrandao(&self) -> Option<B256> {
self.0.parent_beacon_block_root()
}

#[inline]
fn blob_excess_gas_and_price(&self) -> Option<BlobExcessGasAndPrice> {
self.0.excess_blob_gas().map(BlobExcessGasAndPrice::new)
}
Expand Down

0 comments on commit 2d87a5a

Please sign in to comment.