File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ use mithril_common::StdError;
21
21
use tokio:: sync:: Mutex ;
22
22
23
23
/// Delete epoch settings for Epoch older than this.
24
- const EPOCH_SETTING_PRUNE_EPOCH_THRESHOLD : Epoch = Epoch ( 3 ) ;
24
+ const EPOCH_SETTING_PRUNE_EPOCH_THRESHOLD : Epoch = Epoch ( 10 ) ;
25
25
26
26
/// Settings for an epoch, including the protocol parameters.
27
27
#[ derive( Debug , PartialEq ) ]
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ impl StorePruner for ProtocolParametersStore {
52
52
fn get_max_records ( & self ) -> Option < usize > {
53
53
self . retention_len
54
54
}
55
+
56
+ /// Pruning is deactivated on this store.
57
+ async fn prune ( & self ) -> Result < ( ) , StoreError > {
58
+ Ok ( ( ) )
59
+ }
55
60
}
56
61
57
62
#[ async_trait]
@@ -160,7 +165,11 @@ mod tests {
160
165
. save_protocol_parameters ( Epoch ( 3 ) , protocol_parameters[ 2 ] . 1 . clone ( ) )
161
166
. await
162
167
. unwrap ( ) ;
163
- assert_eq ! ( None , store. get_protocol_parameters( Epoch ( 1 ) ) . await . unwrap( ) ) ;
168
+ assert ! ( store
169
+ . get_protocol_parameters( Epoch ( 1 ) )
170
+ . await
171
+ . unwrap( )
172
+ . is_some( ) ) ;
164
173
let res = store. get_protocol_parameters ( Epoch ( 2 ) ) . await . unwrap ( ) ;
165
174
assert ! ( res. is_some( ) ) ;
166
175
}
@@ -192,11 +201,11 @@ mod tests {
192
201
. get_protocol_parameters( Epoch ( 1 ) )
193
202
. await
194
203
. unwrap( )
195
- . is_none ( ) ) ;
204
+ . is_some ( ) ) ;
196
205
assert ! ( store
197
206
. get_protocol_parameters( Epoch ( 2 ) )
198
207
. await
199
208
. unwrap( )
200
- . is_none ( ) ) ;
209
+ . is_some ( ) ) ;
201
210
}
202
211
}
You can’t perform that action at this time.
0 commit comments