fix(static-file): pass producer as Arc<Mutex<_>> to ensure only one is active (#7143)

Co-authored-by: joshieDo <ranriver@protonmail.com>
This commit is contained in:
Alexey Shekhirin
2024-03-15 13:26:15 +00:00
committed by GitHub
parent 189de79bd9
commit 52d49832d9
10 changed files with 149 additions and 46 deletions

View File

@@ -107,19 +107,17 @@ impl ImportCommand {
let tip = file_client.tip().expect("file client has no tip");
info!(target: "reth::cli", "Chain file imported");
let static_file_producer = StaticFileProducer::new(
provider_factory.clone(),
provider_factory.static_file_provider(),
PruneModes::default(),
);
let (mut pipeline, events) = self
.build_import_pipeline(
config,
provider_factory.clone(),
&consensus,
file_client,
static_file_producer,
StaticFileProducer::new(
provider_factory.clone(),
provider_factory.static_file_provider(),
PruneModes::default(),
),
)
.await?;