mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
feat(bin, engine, prune): spawn pruning task from the engine (#3566)
This commit is contained in:
@@ -36,6 +36,7 @@ reth-payload-builder = { workspace = true }
|
||||
reth-basic-payload-builder = { path = "../../crates/payload/basic" }
|
||||
reth-discv4 = { path = "../../crates/net/discv4" }
|
||||
reth-metrics = { workspace = true }
|
||||
reth-prune = { path = "../../crates/prune" }
|
||||
jemallocator = { version = "0.5.0", optional = true }
|
||||
jemalloc-ctl = { version = "0.5.0", optional = true }
|
||||
|
||||
|
||||
@@ -360,6 +360,11 @@ impl Command {
|
||||
None
|
||||
};
|
||||
|
||||
let pruner = config.prune.map(|prune_config| {
|
||||
info!(target: "reth::cli", "Pruner initialized");
|
||||
reth_prune::Pruner::new(prune_config.block_interval, tree_config.max_reorg_depth())
|
||||
});
|
||||
|
||||
// Configure the consensus engine
|
||||
let (beacon_consensus_engine, beacon_engine_handle) = BeaconConsensusEngine::with_channel(
|
||||
client,
|
||||
@@ -374,6 +379,7 @@ impl Command {
|
||||
MIN_BLOCKS_FOR_PIPELINE_RUN,
|
||||
consensus_engine_tx,
|
||||
consensus_engine_rx,
|
||||
pruner,
|
||||
)?;
|
||||
info!(target: "reth::cli", "Consensus engine initialized");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user