@@ -228,7 +228,10 @@ impl StateMachine {
228
228
. await
229
229
{
230
230
* state = self
231
- . transition_from_ready_to_sign_to_ready_to_sign ( * epoch, & certificate)
231
+ . transition_from_ready_to_sign_to_ready_to_sign (
232
+ * epoch,
233
+ & certificate. signed_entity_type ,
234
+ )
232
235
. await ?;
233
236
}
234
237
}
@@ -412,10 +415,9 @@ impl StateMachine {
412
415
/// Launch the transition process from the `ReadyToSign` to the `ReadyToSign` state.
413
416
async fn transition_from_ready_to_sign_to_ready_to_sign (
414
417
& self ,
415
- state_epoch : Epoch ,
416
- pending_certificate : & CertificatePending ,
418
+ current_epoch : Epoch ,
419
+ signed_entity_type : & SignedEntityType ,
417
420
) -> Result < SignerState , RuntimeError > {
418
- let current_epoch = pending_certificate. epoch ;
419
421
let ( retrieval_epoch, next_retrieval_epoch) = (
420
422
current_epoch. offset_to_signer_retrieval_epoch ( ) ?,
421
423
current_epoch. offset_to_next_signer_retrieval_epoch ( ) ,
@@ -433,7 +435,7 @@ impl StateMachine {
433
435
434
436
let message = self
435
437
. runner
436
- . compute_message ( & pending_certificate . signed_entity_type )
438
+ . compute_message ( signed_entity_type)
437
439
. await
438
440
. map_err ( |e| RuntimeError :: KeepState {
439
441
message : format ! ( "Could not compute message during 'ready to sign → ready to sign' phase (current epoch {current_epoch:?})" ) ,
@@ -448,7 +450,7 @@ impl StateMachine {
448
450
message : format ! ( "Could not compute single signature during 'ready to sign → ready to sign' phase (current epoch {current_epoch:?})" ) ,
449
451
nested_error : Some ( e)
450
452
} ) ?;
451
- self . runner . send_single_signature ( & pending_certificate . signed_entity_type , single_signatures) . await
453
+ self . runner . send_single_signature ( signed_entity_type, single_signatures) . await
452
454
. map_err ( |e| RuntimeError :: KeepState {
453
455
message : format ! ( "Could not send single signature during 'ready to sign → ready to sign' phase (current epoch {current_epoch:?})" ) ,
454
456
nested_error : Some ( e)
@@ -460,8 +462,8 @@ impl StateMachine {
460
462
. signature_registration_success_last_epoch_gauge_set ( current_epoch) ;
461
463
462
464
Ok ( SignerState :: ReadyToSign {
463
- epoch : state_epoch ,
464
- last_signed_entity_type : Some ( pending_certificate . to_owned ( ) . signed_entity_type ) ,
465
+ epoch : current_epoch ,
466
+ last_signed_entity_type : Some ( signed_entity_type . to_owned ( ) ) ,
465
467
} )
466
468
}
467
469
0 commit comments