Skip to content
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/op-rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ custom-engine-api = []

[[bin]]
name = "op-rbuilder"
path = "src/main.rs"
path = "src/bin/op-rbuilder/main.rs"

[[bin]]
name = "tester"
Expand Down
10 changes: 10 additions & 0 deletions crates/op-rbuilder/src/bin/op-rbuilder/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use op_rbuilder::launcher::launch;

// Prefer jemalloc for performance reasons.
#[cfg(all(feature = "jemalloc", unix))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

fn main() -> eyre::Result<()> {
launch()
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
use args::*;
use builders::{BuilderMode, FlashblocksBuilder, StandardBuilder};
use eyre::Result;

/// CLI argument parsing.
pub mod args;
mod builders;
mod metrics;
mod monitor_tx_pool;
mod primitives;
mod revert_protection;
mod traits;
mod tx;
mod tx_signer;

use builders::{BuilderConfig, PayloadBuilder};
use crate::{
args::*,
builders::{BuilderConfig, BuilderMode, FlashblocksBuilder, PayloadBuilder, StandardBuilder},
metrics::VERSION,
monitor_tx_pool::monitor_tx_pool,
primitives::reth::engine_api_builder::OpEngineApiBuilder,
revert_protection::{EthApiExtServer, EthApiOverrideServer, RevertProtectionExt},
tx::FBPooledTransaction,
};
use core::fmt::Debug;
use metrics::VERSION;
use moka::future::Cache;
use monitor_tx_pool::monitor_tx_pool;
use primitives::reth::engine_api_builder::OpEngineApiBuilder;
use reth::builder::{NodeBuilder, WithLaunchContext};
use reth_cli_commands::launcher::Launcher;
use reth_db::mdbx::DatabaseEnv;
Expand All @@ -29,16 +21,9 @@ use reth_optimism_node::{
OpNode,
};
use reth_transaction_pool::TransactionPool;
use revert_protection::{EthApiExtServer, EthApiOverrideServer, RevertProtectionExt};
use std::{marker::PhantomData, sync::Arc};
use tx::FBPooledTransaction;

// Prefer jemalloc for performance reasons.
#[cfg(all(feature = "jemalloc", unix))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

fn main() -> Result<()> {
pub fn launch() -> Result<()> {
let cli = Cli::parsed();
let mode = cli.builder_mode();
let mut cli_app = cli.configure();
Expand Down
8 changes: 8 additions & 0 deletions crates/op-rbuilder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ pub mod tests;

pub mod traits;
pub mod tx;

/// CLI argument parsing.
pub mod args;
mod builders;
pub mod launcher;
mod metrics;
mod monitor_tx_pool;
mod revert_protection;
Loading