feat(provider): implement BlockProvider::block (#1426)

This commit is contained in:
Roman Krasiuk
2023-02-17 13:13:49 +02:00
committed by GitHub
parent 94f759761a
commit 4203d7a9b7
5 changed files with 56 additions and 14 deletions

View File

@ -150,7 +150,7 @@ impl Command {
// TODO(mattsse): cleanup, add cli args
let _rpc_server = reth_rpc_builder::launch(
ShareableDatabase::new(db.clone()),
ShareableDatabase::new(db.clone(), self.chain.clone()),
reth_transaction_pool::test_utils::testing_pool(),
network.clone(),
TransportRpcModuleConfig::default()
@ -324,7 +324,7 @@ impl Command {
.network_config(config, self.chain.clone())
.with_task_executor(Box::new(executor))
.set_head(head)
.build(Arc::new(ShareableDatabase::new(db)))
.build(Arc::new(ShareableDatabase::new(db, self.chain.clone())))
}
async fn build_pipeline<H, B, U>(

View File

@ -107,7 +107,7 @@ impl Command {
network_config_builder = self.discovery.apply_to_builder(network_config_builder);
let network = network_config_builder
.build(Arc::new(ShareableDatabase::new(noop_db)))
.build(Arc::new(ShareableDatabase::new(noop_db, self.chain.clone())))
.start_network()
.await?;

View File

@ -136,7 +136,7 @@ impl Command {
let network = self
.network
.network_config(&config, self.chain.clone())
.build(Arc::new(ShareableDatabase::new(db.clone())))
.build(Arc::new(ShareableDatabase::new(db.clone(), self.chain.clone())))
.start_network()
.await?;
let fetch_client = Arc::new(network.fetch_client().await?);