Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: unify unchecked naming #13391

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/exex/exex/src/backfill/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ where
// TODO(alexey): report gas metrics using `block.header.gas_used`

// Seal the block back and save it
blocks.push(block.seal(hash));
blocks.push(block.seal_unchecked(hash));

// Check if we should commit now
let bundle_size_hint = executor.size_hint().unwrap_or_default() as u64;
Expand Down
2 changes: 1 addition & 1 deletion crates/optimism/rpc/src/eth/pending_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ where
.block_with_senders(block_id, Default::default())
.map_err(Self::Error::from_eth_err)?
.ok_or(EthApiError::HeaderNotFound(block_id.into()))?
.seal(latest.hash());
.seal_unchecked(latest.hash());

let receipts = self
.provider()
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl<B: reth_primitives_traits::Block> BlockWithSenders<B> {
///
/// WARNING: This method does not perform validation whether the hash is correct.
#[inline]
pub fn seal(self, hash: B256) -> SealedBlockWithSenders<B> {
pub fn seal_unchecked(self, hash: B256) -> SealedBlockWithSenders<B> {
let Self { block, senders } = self;
SealedBlockWithSenders::<B> { block: block.seal(hash), senders }
}
Expand Down
2 changes: 1 addition & 1 deletion crates/stages/stages/src/stages/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ where
if !blocks.is_empty() {
let blocks = blocks.into_iter().map(|block| {
let hash = block.header().hash_slow();
block.seal(hash)
block.seal_unchecked(hash)
});

let previous_input =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ mod tests {
.unseal::<reth_primitives::Block>()
.with_recovered_senders()
.unwrap()
.seal(block.hash())
.seal_unchecked(block.hash())
)
),
(BlockHashOrNumber::Number(u64::MAX), TransactionVariant::WithHash)
Expand All @@ -2593,7 +2593,7 @@ mod tests {
.unseal::<reth_primitives::Block>()
.with_recovered_senders()
.unwrap()
.seal(block.hash())
.seal_unchecked(block.hash())
)
),
(BlockHashOrNumber::Hash(B256::random()), TransactionVariant::WithHash)
Expand Down
Loading