diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index d400813904..78b0151171 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -55,7 +55,7 @@ reth-trie.workspace = true reth-nippy-jar.workspace = true reth-node-api.workspace = true reth-node-ethereum.workspace = true -reth-node-optimism = { workspace = true, optional = true } +reth-node-optimism = { workspace = true, optional = true, features = ["optimism"] } reth-node-core.workspace = true # crypto diff --git a/bin/reth/src/commands/debug_cmd/build_block.rs b/bin/reth/src/commands/debug_cmd/build_block.rs index 698e7bcd9a..0507ad2f72 100644 --- a/bin/reth/src/commands/debug_cmd/build_block.rs +++ b/bin/reth/src/commands/debug_cmd/build_block.rs @@ -1,6 +1,13 @@ //! Command for debugging block building. -use crate::runner::CliContext; +use crate::{ + args::{ + utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, + DatabaseArgs, + }, + dirs::{DataDirPath, MaybePlatformPath}, + runner::CliContext, +}; use alloy_rlp::Decodable; use clap::Parser; use eyre::Context; @@ -19,6 +26,8 @@ use reth_node_ethereum::EthEvmConfig; #[cfg(feature = "optimism")] use reth_node_optimism::OptimismEvmConfig; use reth_payload_builder::database::CachedReads; +#[cfg(not(feature = "optimism"))] +use reth_payload_builder::EthPayloadBuilderAttributes; #[cfg(feature = "optimism")] use reth_payload_builder::OptimismPayloadBuilderAttributes; use reth_primitives::{ @@ -44,16 +53,6 @@ use reth_transaction_pool::{ use std::{path::PathBuf, str::FromStr, sync::Arc}; use tracing::*; -use crate::{ - args::{ - utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, - DatabaseArgs, - }, - dirs::{DataDirPath, MaybePlatformPath}, -}; -#[cfg(not(feature = "optimism"))] -use reth_payload_builder::EthPayloadBuilderAttributes; - /// `reth debug build-block` command /// This debug routine requires that the node is positioned at the block before the target. /// The script will then parse the block and attempt to build a similar one.