Skip to content

Commit

Permalink
rename trait
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Nov 25, 2024
1 parent f7c301d commit d54846d
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 29 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 @@ -18,7 +18,7 @@ use clap::Parser;
use csv::Writer;
use reth_cli_runner::CliContext;
use reth_node_core::args::BenchmarkArgs;
use reth_primitives::{Block, BlockSealExt};
use reth_primitives::{Block, BlockExt};
use reth_rpc_types_compat::engine::payload::block_to_payload;
use std::time::Instant;
use tracing::{debug, info};
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 @@ -16,7 +16,7 @@ use clap::Parser;
use csv::Writer;
use reth_cli_runner::CliContext;
use reth_node_core::args::BenchmarkArgs;
use reth_primitives::{Block, BlockSealExt};
use reth_primitives::{Block, BlockExt};
use reth_rpc_types_compat::engine::payload::block_to_payload;
use std::time::Instant;
use tracing::{debug, info};
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/commands/debug_cmd/build_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use reth_fs_util as fs;
use reth_node_api::{BlockTy, EngineApiMessageVersion, PayloadBuilderAttributes};
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
use reth_primitives::{
BlobTransaction, BlockSealExt, PooledTransactionsElement, SealedBlock, SealedBlockWithSenders,
BlobTransaction, BlockExt, PooledTransactionsElement, SealedBlock, SealedBlockWithSenders,
SealedHeader, Transaction, TransactionSigned,
};
use reth_provider::{
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/commands/debug_cmd/in_memory_merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use reth_execution_types::ExecutionOutcome;
use reth_network::{BlockDownloaderProvider, NetworkHandle};
use reth_network_api::NetworkInfo;
use reth_node_ethereum::EthExecutorProvider;
use reth_primitives::BlockSealExt;
use reth_primitives::BlockExt;
use reth_provider::{
providers::ProviderNodeTypes, writer::UnifiedStorageWriter, AccountExtReader,
ChainSpecProvider, HashingWriter, HeaderProvider, LatestStateProviderRef, OriginalValuesKnown,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ mod tests {
use assert_matches::assert_matches;
use reth_chainspec::{ChainSpecBuilder, MAINNET};
use reth_node_types::FullNodePrimitives;
use reth_primitives::BlockSealExt;
use reth_primitives::BlockExt;
use reth_provider::{BlockWriter, ProviderFactory, StorageLocation};
use reth_rpc_types_compat::engine::payload::block_to_payload_v1;
use reth_stages::{ExecOutput, PipelineError, StageError};
Expand Down
2 changes: 1 addition & 1 deletion crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,7 @@ mod tests {
use reth_engine_primitives::ForkchoiceStatus;
use reth_ethereum_engine_primitives::EthEngineTypes;
use reth_evm::test_utils::MockExecutorProvider;
use reth_primitives::BlockSealExt;
use reth_primitives::BlockExt;
use reth_provider::test_utils::MockEthProvider;
use reth_rpc_types_compat::engine::{block_to_payload_v1, payload::block_to_payload_v3};
use reth_trie::updates::TrieUpdates;
Expand Down
2 changes: 1 addition & 1 deletion crates/engine/util/src/reorg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use reth_evm::{
ConfigureEvm,
};
use reth_payload_validator::ExecutionPayloadValidator;
use reth_primitives::{proofs, Block, BlockBody, BlockSealExt, Receipt, Receipts};
use reth_primitives::{proofs, Block, BlockBody, BlockExt, Receipt, Receipts};
use reth_provider::{BlockReader, ExecutionOutcome, ProviderError, StateProviderFactory};
use reth_revm::{
database::StateProviderDatabase,
Expand Down
2 changes: 1 addition & 1 deletion crates/ethereum/evm/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ mod tests {
};
use reth_execution_types::BlockExecutionOutput;
use reth_primitives::{
public_key_to_address, Account, Block, BlockBody, BlockSealExt, Transaction,
public_key_to_address, Account, Block, BlockBody, BlockExt, Transaction,
};
use reth_revm::{
database::StateProviderDatabase, test_utils::StateProviderTest, TransitionState,
Expand Down
2 changes: 1 addition & 1 deletion crates/ethereum/payload/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use reth_payload_builder_primitives::PayloadBuilderError;
use reth_payload_primitives::PayloadBuilderAttributes;
use reth_primitives::{
proofs::{self},
Block, BlockBody, BlockSealExt, EthereumHardforks, Receipt,
Block, BlockBody, BlockExt, EthereumHardforks, Receipt,
};
use reth_provider::{ChainSpecProvider, StateProviderFactory};
use reth_revm::database::StateProviderDatabase;
Expand Down
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 @@ -8,7 +8,7 @@ use alloy_primitives::BlockNumber;
use reth_evm::execute::{
BatchExecutor, BlockExecutionError, BlockExecutionOutput, BlockExecutorProvider, Executor,
};
use reth_primitives::{Block, BlockSealExt, BlockWithSenders, Receipt};
use reth_primitives::{Block, BlockExt, BlockWithSenders, Receipt};
use reth_primitives_traits::format_gas_throughput;
use reth_provider::{
BlockReader, Chain, HeaderProvider, ProviderError, StateProviderFactory, TransactionVariant,
Expand Down
2 changes: 1 addition & 1 deletion crates/exex/exex/src/backfill/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use reth_evm::execute::{
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_node_api::FullNodePrimitives;
use reth_primitives::{
Block, BlockBody, BlockSealExt, BlockWithSenders, Receipt, SealedBlockWithSenders, Transaction,
Block, BlockBody, BlockExt, BlockWithSenders, Receipt, SealedBlockWithSenders, Transaction,
};
use reth_provider::{
providers::ProviderNodeTypes, BlockWriter as _, ExecutionOutcome, LatestStateProviderRef,
Expand Down
2 changes: 1 addition & 1 deletion crates/exex/exex/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ mod tests {
use futures::StreamExt;
use reth_db_common::init::init_genesis;
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_primitives::{Block, BlockSealExt};
use reth_primitives::{Block, BlockExt};
use reth_provider::{
providers::BlockchainProvider2, test_utils::create_test_provider_factory, BlockWriter,
Chain, DatabaseProviderFactory, StorageLocation,
Expand Down
2 changes: 1 addition & 1 deletion crates/exex/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use reth_node_ethereum::{
EthEngineTypes, EthEvmConfig,
};
use reth_payload_builder::noop::NoopPayloadBuilderService;
use reth_primitives::{BlockSealExt, EthPrimitives, Head, SealedBlockWithSenders};
use reth_primitives::{BlockExt, EthPrimitives, Head, SealedBlockWithSenders};
use reth_provider::{
providers::{BlockchainProvider, StaticFileProvider},
BlockReader, EthStorage, ProviderFactory,
Expand Down
2 changes: 1 addition & 1 deletion crates/optimism/payload/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use reth_payload_builder_primitives::PayloadBuilderError;
use reth_payload_primitives::PayloadBuilderAttributes;
use reth_payload_util::PayloadTransactions;
use reth_primitives::{
proofs, Block, BlockBody, BlockSealExt, Receipt, SealedHeader, TransactionSigned, TxType,
proofs, Block, BlockBody, BlockExt, Receipt, SealedHeader, TransactionSigned, TxType,
};
use reth_provider::{ProviderError, StateProofProvider, StateProviderFactory, StateRootProvider};
use reth_revm::database::StateProviderDatabase;
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/builder/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloy_primitives::U256;
use reth_chain_state::{CanonStateNotification, ExecutedBlock};
use reth_payload_builder_primitives::PayloadBuilderError;
use reth_payload_primitives::{PayloadKind, PayloadTypes};
use reth_primitives::{Block, BlockSealExt};
use reth_primitives::{Block, BlockExt};
use std::{
future::Future,
pin::Pin,
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use alloy_rpc_types::engine::{
ExecutionPayload, ExecutionPayloadSidecar, MaybeCancunPayloadFields, PayloadError,
};
use reth_chainspec::EthereumHardforks;
use reth_primitives::{BlockSealExt, SealedBlock};
use reth_primitives::{BlockExt, SealedBlock};
use reth_rpc_types_compat::engine::payload::try_into_block;
use std::sync::Arc;

Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
traits::BlockSealExt, transaction::SignedTransactionIntoRecoveredExt, BlockBodyTxExt,
GotExpected, SealedHeader, TransactionSigned, TransactionSignedEcRecovered,
traits::BlockExt, transaction::SignedTransactionIntoRecoveredExt, BlockBodyTxExt, GotExpected,
SealedHeader, TransactionSigned, TransactionSignedEcRecovered,
};
use alloc::vec::Vec;
use alloy_consensus::Header;
Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use revm_primitives::{Address, B256};
/// Extension trait for [`reth_primitives_traits::Block`] implementations
/// allowing for conversions into common block parts containers such as [`SealedBlock`],
/// [`BlockWithSenders`], etc.
pub trait BlockSealExt: Block {
pub trait BlockExt: Block {
/// Calculate the header hash and seal the block so that it can't be changed.
fn seal_slow(self) -> SealedBlock<Self::Header, Self::Body> {
let (header, body) = self.split();
Expand Down Expand Up @@ -87,7 +87,7 @@ pub trait BlockSealExt: Block {
}
}

impl<T: Block> BlockSealExt for T {}
impl<T: Block> BlockExt for T {}

/// Extension trait for [`BlockBody`] adding helper methods operating with transactions.
pub trait BlockBodyTxExt: BlockBody {
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-builder/tests/it/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy_primitives::U64;
use alloy_rpc_types_engine::{ForkchoiceState, PayloadId, TransitionConfiguration};
use jsonrpsee::core::client::{ClientT, SubscriptionClientT};
use reth_ethereum_engine_primitives::EthEngineTypes;
use reth_primitives::{Block, BlockSealExt};
use reth_primitives::{Block, BlockExt};
use reth_rpc_api::clients::EngineApiClient;
use reth_rpc_layer::JwtSecret;
use reth_rpc_types_compat::engine::payload::{
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-eth-api/src/helpers/pending_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use reth_evm::{
};
use reth_execution_types::ExecutionOutcome;
use reth_primitives::{
proofs::calculate_transaction_root, Block, BlockBody, BlockSealExt, Receipt,
proofs::calculate_transaction_root, Block, BlockBody, BlockExt, Receipt,
SealedBlockWithSenders, SealedHeader, TransactionSignedEcRecovered,
};
use reth_provider::{
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc-types-compat/src/engine/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use alloy_rpc_types_engine::{
};
use reth_primitives::{
proofs::{self},
Block, BlockBody, BlockSealExt, SealedBlock, TransactionSigned,
Block, BlockBody, BlockExt, SealedBlock, TransactionSigned,
};

/// Converts [`ExecutionPayloadV1`] to [`Block`]
Expand Down Expand Up @@ -363,7 +363,7 @@ mod tests {
CancunPayloadFields, ExecutionPayload, ExecutionPayloadSidecar, ExecutionPayloadV1,
ExecutionPayloadV2, ExecutionPayloadV3,
};
use reth_primitives::BlockSealExt;
use reth_primitives::BlockExt;

#[test]
fn roundtrip_payload_to_block() {
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use reth_evm::{
execute::{BlockExecutorProvider, Executor},
ConfigureEvmEnv,
};
use reth_primitives::{Block, BlockSealExt, SealedBlockWithSenders};
use reth_primitives::{Block, BlockExt, SealedBlockWithSenders};
use reth_provider::{
BlockReaderIdExt, ChainSpecProvider, HeaderProvider, StateProofProvider, StateProviderFactory,
TransactionVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ mod tests {
use reth_errors::ProviderError;
use reth_execution_types::{Chain, ExecutionOutcome};
use reth_primitives::{
BlockSealExt, Receipt, SealedBlock, StaticFileSegment, TransactionSignedNoHash,
BlockExt, Receipt, SealedBlock, StaticFileSegment, TransactionSignedNoHash,
};
use reth_storage_api::{
BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, BlockSource,
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/provider/src/providers/database/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use reth_execution_types::{Chain, ExecutionOutcome};
use reth_network_p2p::headers::downloader::SyncTarget;
use reth_node_types::{BlockTy, NodeTypes, TxTy};
use reth_primitives::{
Account, Block, BlockBody, BlockSealExt, BlockWithSenders, Bytecode, GotExpected, Receipt,
Account, Block, BlockBody, BlockExt, BlockWithSenders, Bytecode, GotExpected, Receipt,
SealedBlock, SealedBlockWithSenders, SealedHeader, StaticFileSegment, StorageEntry,
TransactionMeta, TransactionSigned, TransactionSignedNoHash,
};
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-payload-builder/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use reth::{
use reth_basic_payload_builder::{BasicPayloadJobGeneratorConfig, PayloadBuilder, PayloadConfig};
use reth_node_api::PayloadBuilderAttributes;
use reth_payload_builder::{PayloadBuilderError, PayloadJobGenerator};
use reth_primitives::{BlockSealExt, SealedHeader};
use reth_primitives::{BlockExt, SealedHeader};
use std::sync::Arc;

/// The generator type that creates new jobs that builds empty blocks.
Expand Down
2 changes: 1 addition & 1 deletion examples/db-access/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use reth_chainspec::ChainSpecBuilder;
use reth_db::{open_db_read_only, DatabaseEnv};
use reth_node_ethereum::EthereumNode;
use reth_node_types::NodeTypesWithDBAdapter;
use reth_primitives::{BlockSealExt, SealedHeader, TransactionSigned};
use reth_primitives::{BlockExt, SealedHeader, TransactionSigned};
use reth_provider::{
providers::StaticFileProvider, AccountReader, BlockReader, BlockSource, HeaderProvider,
ProviderFactory, ReceiptProvider, StateProvider, TransactionsProvider,
Expand Down

0 comments on commit d54846d

Please sign in to comment.