Skip to content

Commit

Permalink
chore: rm blob_versioned_hashes (#13390)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Dec 13, 2024
1 parent a7ebd15 commit fb962fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bin/reth-bench/src/bench/new_payload_fcu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Command {
let block_number = block.header.number;

let versioned_hashes: Vec<B256> =
block.body.blob_versioned_hashes().into_iter().copied().collect();
block.body.blob_versioned_hashes_iter().copied().collect();
let parent_beacon_block_root = block.parent_beacon_block_root;
let payload = block_to_payload(block);

Expand Down
2 changes: 1 addition & 1 deletion bin/reth-bench/src/bench/new_payload_only.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Command {
let gas_used = block.gas_used;

let versioned_hashes: Vec<B256> =
block.body.blob_versioned_hashes().into_iter().copied().collect();
block.body.blob_versioned_hashes_iter().copied().collect();
let parent_beacon_block_root = block.parent_beacon_block_root;
let payload = block_to_payload(block);

Expand Down
13 changes: 6 additions & 7 deletions crates/engine/local/src/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,12 @@ where

let block = payload.block();

let cancun_fields = self
.provider
.chain_spec()
.is_cancun_active_at_timestamp(block.timestamp)
.then(|| CancunPayloadFields {
parent_beacon_block_root: block.parent_beacon_block_root.unwrap(),
versioned_hashes: block.body.blob_versioned_hashes().into_iter().copied().collect(),
let cancun_fields =
self.provider.chain_spec().is_cancun_active_at_timestamp(block.timestamp).then(|| {
CancunPayloadFields {
parent_beacon_block_root: block.parent_beacon_block_root.unwrap(),
versioned_hashes: block.body.blob_versioned_hashes_iter().copied().collect(),
}
});

let (tx, rx) = oneshot::channel();
Expand Down
6 changes: 0 additions & 6 deletions crates/primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,6 @@ impl BlockBody {
.filter_map(|tx| tx.as_eip4844().map(|blob_tx| &blob_tx.blob_versioned_hashes))
.flatten()
}

/// Returns all blob versioned hashes from the block body.
#[inline]
pub fn blob_versioned_hashes(&self) -> Vec<&B256> {
self.blob_versioned_hashes_iter().collect()
}
}

impl<T> BlockBody<T> {
Expand Down

0 comments on commit fb962fc

Please sign in to comment.