From 227e1b7ad513977f4f48b18041df02686fca5f94 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:48:09 -0500 Subject: [PATCH] feat: make load_network_config and lookup_head generic over DB (#5692) Co-authored-by: Matthias Seitz --- bin/reth/src/node/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs index 1b4eaeb20f..37773a87b7 100644 --- a/bin/reth/src/node/mod.rs +++ b/bin/reth/src/node/mod.rs @@ -744,7 +744,7 @@ impl NodeCommand { /// Fetches the head block from the database. /// /// If the database is empty, returns the genesis block. - fn lookup_head(&self, db: Arc) -> RethResult { + fn lookup_head(&self, db: DB) -> RethResult { let factory = ProviderFactory::new(db, self.chain.clone()); let provider = factory.provider()?; @@ -826,15 +826,15 @@ impl NodeCommand { } } - fn load_network_config( + fn load_network_config( &self, config: &Config, - db: Arc, + db: DB, executor: TaskExecutor, head: Head, secret_key: SecretKey, default_peers_path: PathBuf, - ) -> NetworkConfig>> { + ) -> NetworkConfig> { let cfg_builder = self .network .network_config(config, self.chain.clone(), secret_key, default_peers_path)