Skip to content

Commit

Permalink
Merge pull request #1770 from subspace/eth_rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas authored Aug 7, 2023
2 parents 5016f44 + f43bf8f commit e8810da
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions domains/service/src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ where
{
let DomainParams {
domain_id,
domain_config,
mut domain_config,
domain_created_at,
consensus_client,
consensus_network_sync_oracle,
Expand Down Expand Up @@ -390,6 +390,7 @@ where
})?;

let is_authority = domain_config.service_config.role.is_authority();
domain_config.service_config.rpc_id_provider = provider.rpc_id();
let rpc_builder = {
let deps = crate::rpc::FullDeps {
client: client.clone(),
Expand All @@ -406,7 +407,18 @@ where
backend: backend.clone(),
};

Box::new(move |_, _| crate::rpc::create_full(deps.clone()).map_err(Into::into))
let spawn_essential = task_manager.spawn_essential_handle();
let rpc_deps = provider.deps(deps)?;
Box::new(move |_, subscription_task_executor| {
let spawn_essential = spawn_essential.clone();
provider
.rpc_builder(
rpc_deps.clone(),
subscription_task_executor,
spawn_essential,
)
.map_err(Into::into)
})
};

let rpc_handlers = sc_service::spawn_tasks(SpawnTasksParams {
Expand Down

0 comments on commit e8810da

Please sign in to comment.