File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
mithril-common/src/crypto_helper/cardano Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -125,21 +125,21 @@ impl StmInitializerWrapper {
125
125
126
126
let kes_sk_period = kes_sk. get_period ( ) ;
127
127
let provided_period = kes_period. unwrap_or_default ( ) ;
128
- if kes_sk_period <= provided_period {
129
- // We need to perform the evolutions
130
- for period in kes_sk_period..provided_period {
131
- kes_sk
132
- . update ( )
133
- . map_err ( |_| ProtocolInitializerErrorWrapper :: KesUpdate ( period) ) ?;
134
- }
135
-
136
- Some ( kes_sk. sign ( & stm_initializer. verification_key ( ) . to_bytes ( ) ) )
137
- } else {
128
+ if kes_sk_period > provided_period {
138
129
return Err ( ProtocolInitializerErrorWrapper :: KesMismatch (
139
130
kes_sk_period,
140
131
provided_period,
141
132
) ) ;
142
133
}
134
+
135
+ // We need to perform the evolutions
136
+ for period in kes_sk_period..provided_period {
137
+ kes_sk
138
+ . update ( )
139
+ . map_err ( |_| ProtocolInitializerErrorWrapper :: KesUpdate ( period) ) ?;
140
+ }
141
+
142
+ Some ( kes_sk. sign ( & stm_initializer. verification_key ( ) . to_bytes ( ) ) )
143
143
} else {
144
144
println ! ( "WARNING: Non certified signer registration by providing only a Pool Id is decommissionned and must be used for tests only!" ) ;
145
145
None
You can’t perform that action at this time.
0 commit comments