@@ -9,9 +9,9 @@ use slog_scope::{debug, trace, warn};
9
9
use thiserror:: Error ;
10
10
11
11
use mithril_common:: crypto_helper:: {
12
- key_decode_hex, key_encode_hex, ProtocolAggregateVerificationKey , ProtocolAggregationError ,
13
- ProtocolClerk , ProtocolKeyRegistration , ProtocolMultiSignature , ProtocolParameters ,
14
- ProtocolPartyId , ProtocolRegistrationError , ProtocolSignerVerificationKey ,
12
+ key_decode_hex, key_encode_hex, KESPeriod , ProtocolAggregateVerificationKey ,
13
+ ProtocolAggregationError , ProtocolClerk , ProtocolKeyRegistration , ProtocolMultiSignature ,
14
+ ProtocolParameters , ProtocolPartyId , ProtocolRegistrationError , ProtocolSignerVerificationKey ,
15
15
ProtocolSingleSignature , ProtocolStakeDistribution , PROTOCOL_VERSION ,
16
16
} ;
17
17
use mithril_common:: entities:: { self , PartyId , Signer , SignerWithStake } ;
@@ -562,11 +562,14 @@ impl MultiSigner for MultiSignerImpl {
562
562
_ => None ,
563
563
} ;
564
564
let kes_period = match & operational_certificate {
565
- Some ( operational_certificate) => self
566
- . chain_observer
567
- . get_current_kes_period ( operational_certificate)
568
- . await
569
- . map_err ( |e| ProtocolError :: ChainObserver ( e. to_string ( ) ) ) ?,
565
+ Some ( operational_certificate) => Some (
566
+ self . chain_observer
567
+ . get_current_kes_period ( operational_certificate)
568
+ . await
569
+ . map_err ( |e| ProtocolError :: ChainObserver ( e. to_string ( ) ) ) ?
570
+ . unwrap_or_default ( )
571
+ - operational_certificate. start_kes_period as KESPeriod ,
572
+ ) ,
570
573
None => None ,
571
574
} ;
572
575
let party_id_save = key_registration. register (
0 commit comments