Skip to content

Commit

Permalink
feat: update node
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <[email protected]>
  • Loading branch information
greged93 committed Jan 24, 2025
1 parent 64ca606 commit c2346cb
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions crates/scroll/bin/scroll-reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::ne
#[cfg(all(feature = "scroll", not(feature = "optimism")))]
fn main() {
use clap::Parser;
use reth_node_builder::{engine_tree_config::TreeConfig, EngineNodeLauncher};
use reth_provider::providers::BlockchainProvider;
use reth_scroll_cli::{Cli, ScrollChainSpecParser, ScrollRollupArgs};
use reth_scroll_node::{ScrollAddOns, ScrollNode};
use reth_scroll_node::ScrollNode;
use tracing::info;

reth_cli_util::sigsegv_handler::install();

// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
Expand All @@ -19,25 +19,8 @@ fn main() {

if let Err(err) = Cli::<ScrollChainSpecParser, ScrollRollupArgs>::parse()
.run::<_, _, ScrollNode>(|builder, _| async move {
let engine_tree_config = TreeConfig::default()
.with_persistence_threshold(builder.config().engine.persistence_threshold)
.with_memory_block_buffer_target(
builder.config().engine.memory_block_buffer_target,
);
let handle = builder
.with_types_and_provider::<ScrollNode, BlockchainProvider<_>>()
.with_components(ScrollNode::components())
.with_add_ons(ScrollAddOns::default())
.launch_with_fn(|builder| {
let launcher = EngineNodeLauncher::new(
builder.task_executor().clone(),
builder.config().datadir(),
engine_tree_config,
);
builder.launch_with(launcher)
})
.await?;

info!(target: "reth::cli", "Launching node");
let handle = builder.launch_node(ScrollNode).await?;
handle.node_exit_future.await
})
{
Expand Down

0 comments on commit c2346cb

Please sign in to comment.