Skip to content

Commit d4c0f2c

Browse files
committed
Remove can_accept_request
1 parent e8f7176 commit d4c0f2c

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

linera-core/src/client/validator_manager/manager.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,8 @@ impl<Env: Environment> ValidatorManager<Env> {
616616
// Filter nodes that can accept requests and calculate their scores
617617
let mut scored_nodes = Vec::new();
618618
for info in nodes.values() {
619-
if info.can_accept_request().await {
620-
let score = info.calculate_score().await;
621-
scored_nodes.push((score, info.node.clone()));
622-
}
619+
let score = info.calculate_score().await;
620+
scored_nodes.push((score, info.node.clone()));
623621
}
624622

625623
// Sort by score (highest first)

linera-core/src/client/validator_manager/node_info.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,6 @@ impl<Env: Environment> NodeInfo<Env> {
125125
raw_score * (0.5 + 0.5 * confidence_factor)
126126
}
127127

128-
/// Checks if the node can accept another request without exceeding capacity.
129-
///
130-
/// This is a read-only check that doesn't reserve a slot.
131-
/// Use `acquire_request_slot` to atomically check and reserve.
132-
pub(super) async fn can_accept_request(&self) -> bool {
133-
self.in_flight_semaphore.available_permits() > 0
134-
}
135-
136128
/// Updates performance metrics using Exponential Moving Average.
137129
///
138130
/// # Arguments

0 commit comments

Comments
 (0)