Skip to content

Commit

Permalink
Log error if authorities empty in quorum_once_inner
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfind committed Oct 21, 2022
1 parent 7aa4041 commit 8f3167a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/sui-core/src/authority_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,14 @@ where
// - If serial_authority_request_interval elapses, we begin a new request even if the
// previous one is not finished, and schedule another future request.

let name = authorities_shuffled.next().unwrap();
let name = authorities_shuffled.next().ok_or_else(|| {
error!(
?preferences,
?restrict_to,
"Available authorities list is empty."
);
SuiError::from("Available authorities list is empty")
})?;
futures.push(start_req(*name, self.authority_clients[name].clone()));
futures.push(schedule_next());

Expand Down

0 comments on commit 8f3167a

Please sign in to comment.