mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 15:48:13 -05:00
chore: unify unchecked naming (#13391)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -187,7 +187,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 }
|
||||
}
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user