File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
mithril-signer/src/runtime Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -198,18 +198,11 @@ impl Runner for SignerRunner {
198198 }
199199 _ => ( None , None ) ,
200200 } ;
201-
202- let kes_period = match operational_certificate {
203- Some ( operational_certificate) => Some (
204- self . services
205- . chain_observer
206- . get_current_kes_period ( )
207- . await ?
208- . unwrap_or_default ( )
209- - operational_certificate. get_start_kes_period ( ) as KesPeriod ,
210- ) ,
211- None => None ,
212- } ;
201+ let current_kes_period = self . services . chain_observer . get_current_kes_period ( ) . await ?;
202+ let kes_evolutions = operational_certificate. map ( |operational_certificate| {
203+ current_kes_period. unwrap_or_default ( )
204+ - operational_certificate. get_start_kes_period ( ) as KesPeriod
205+ } ) ;
213206
214207 let protocol_initializer = self
215208 . services
@@ -225,15 +218,15 @@ impl Runner for SignerRunner {
225218 stake,
226219 & protocol_parameters,
227220 self . services . kes_signer . clone ( ) ,
228- kes_period ,
221+ current_kes_period ,
229222 ) ?;
230223
231224 let signer = Signer :: new (
232225 self . services . single_signer . get_party_id ( ) ,
233226 protocol_initializer. verification_key ( ) . into ( ) ,
234227 protocol_initializer. verification_key_signature ( ) ,
235228 protocol_operational_certificate,
236- kes_period ,
229+ kes_evolutions ,
237230 ) ;
238231 self . services
239232 . signer_registration_publisher
You can’t perform that action at this time.
0 commit comments