File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ use crate::{
15
15
16
16
#[ derive( Default ) ]
17
17
pub struct MockKeyManagerClient {
18
- keys : Mutex < HashMap < KeyPairId , KeyPair > > ,
19
- ephemeral_keys : Mutex < HashMap < KeyPairId , KeyPair > > ,
18
+ pub keys : Mutex < HashMap < KeyPairId , KeyPair > > ,
19
+ pub ephemeral_keys : Mutex < HashMap < KeyPairId , KeyPair > > ,
20
20
}
21
21
22
22
impl Clone for MockKeyManagerClient {
Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ impl Mock {
101
101
)
102
102
}
103
103
104
+ /// Create a new mock dispatch context.
105
+ pub fn create_ctx_with_key_manager ( & mut self , key_manager : Box < dyn KeyManager > ) -> RuntimeBatchContext < ' _ , EmptyRuntime > {
106
+ RuntimeBatchContext :: new (
107
+ & self . host_info ,
108
+ Some ( key_manager) ,
109
+ & self . runtime_header ,
110
+ & self . runtime_round_results ,
111
+ & self . consensus_state ,
112
+ & self . history ,
113
+ self . epoch ,
114
+ self . max_messages ,
115
+ )
116
+ }
117
+
104
118
/// Create an instance with the given local configuration.
105
119
pub fn with_local_config ( local_config : BTreeMap < String , cbor:: Value > ) -> Self {
106
120
// Ensure a current state is always available during tests. Note that one can always use a
You can’t perform that action at this time.
0 commit comments