Skip to content

Commit 27912bc

Browse files
committed
Review comments taken into account
1 parent 82d128a commit 27912bc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mithril-aggregator/src/http_server/routes/reply.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub struct MithrilStatusCode();
1414

1515
impl MithrilStatusCode {
1616
pub fn registration_round_not_yet_opened() -> StatusCode {
17+
// The unwrap is safe here because `from_16` function return error only for values outside of the range 100-999,
1718
StatusCode::from_u16(550).unwrap()
1819
}
1920
}

mithril-signer/src/runtime/state_machine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ impl StateMachine {
318318
nested_error: Some(e),
319319
})?;
320320

321-
fn filter_error(
321+
fn handle_registration_result(
322322
register_result: Result<(), Error>,
323323
epoch: Epoch,
324324
) -> Result<Option<SignerState>, RuntimeError> {
@@ -338,7 +338,7 @@ impl StateMachine {
338338
}
339339

340340
let register_result = self.runner.register_signer_to_aggregator().await;
341-
let next_state_found = filter_error(register_result, epoch)?;
341+
let next_state_found = handle_registration_result(register_result, epoch)?;
342342

343343
self.metrics_service
344344
.get_signer_registration_success_since_startup_counter()

0 commit comments

Comments
 (0)