Skip to content

Commit 2d31805

Browse files
committed
feat: add testing 'override_protocol_parameters' capability to StmInitializerWrapper
1 parent 97aa214 commit 2d31805

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mithril-common/src/crypto_helper/cardano/key_certification.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,13 @@ impl StmInitializerWrapper {
244244
kes_signature,
245245
})
246246
}
247+
248+
cfg_test_tools! {
249+
/// Override the protocol parameters of the `StmInitializer` for testing purposes only.
250+
pub fn override_protocol_parameters(&mut self, protocol_parameters: &ProtocolParameters) {
251+
self.stm_initializer.params = protocol_parameters.to_owned();
252+
}
253+
}
247254
}
248255

249256
impl KeyRegWrapper {

0 commit comments

Comments
 (0)