refactor: remove service_name (#8606)

Which issue # does this PR address?
#8586


  Please list or describe the changes introduced by this PR.
Remove `service_name` from `TaskExecutor`


Co-Authored-By: Abhivansh <31abhivanshj@gmail.com>
This commit is contained in:
Abhivansh
2026-01-02 05:37:40 +05:30
committed by GitHub
parent 6dab3c9a61
commit 9b3d7e3a54
12 changed files with 26 additions and 134 deletions

View File

@@ -118,7 +118,6 @@ pub async fn build_libp2p_instance(
boot_nodes: Vec<Enr>,
fork_name: ForkName,
chain_spec: Arc<ChainSpec>,
service_name: String,
disable_peer_scoring: bool,
inbound_rate_limiter: Option<InboundRateLimiterConfig>,
) -> Libp2pInstance {
@@ -127,7 +126,7 @@ pub async fn build_libp2p_instance(
let (signal, exit) = async_channel::bounded(1);
let (shutdown_tx, _) = futures::channel::mpsc::channel(1);
let executor = task_executor::TaskExecutor::new(rt, exit, shutdown_tx, service_name);
let executor = task_executor::TaskExecutor::new(rt, exit, shutdown_tx);
let custody_group_count = chain_spec.custody_requirement;
let libp2p_context = lighthouse_network::Context {
config,
@@ -177,7 +176,6 @@ pub async fn build_node_pair(
vec![],
fork_name,
spec.clone(),
"sender".to_string(),
disable_peer_scoring,
inbound_rate_limiter.clone(),
)
@@ -187,7 +185,6 @@ pub async fn build_node_pair(
vec![],
fork_name,
spec.clone(),
"receiver".to_string(),
disable_peer_scoring,
inbound_rate_limiter,
)
@@ -266,16 +263,7 @@ pub async fn build_linear(
let mut nodes = Vec::with_capacity(n);
for _ in 0..n {
nodes.push(
build_libp2p_instance(
rt.clone(),
vec![],
fork_name,
spec.clone(),
"linear".to_string(),
false,
None,
)
.await,
build_libp2p_instance(rt.clone(), vec![], fork_name, spec.clone(), false, None).await,
);
}