@@ -17,23 +17,14 @@ use crate::RunnerError;
17
17
/// Errors dedicated to the CertifierService.
18
18
#[ derive( Debug , Error ) ]
19
19
pub enum EpochServiceError {
20
- // /// One of the data that is held for an epoch duration by the service was not available.
21
- // #[error("Epoch service could not obtain {1} for epoch {0}")]
22
- // UnavailableData(Epoch, String),
23
20
/// Raised when service has not collected data at least once.
24
21
#[ error( "Epoch service was not initialized, the function `inform_epoch` must be called first" ) ]
25
22
NotYetInitialized ,
26
- // /// Raised when service has not computed data for its current epoch.
27
- // #[error(
28
- // "No data computed for epoch {0}, the function `precompute_epoch_data` must be called first"
29
- // )]
30
- // NotYetComputed(Epoch),
31
23
}
32
24
33
25
/// Service that aggregates all data that don't change in a given epoch.
34
26
#[ async_trait]
35
27
pub trait EpochService : Sync + Send {
36
- // TODO should we pass ean EpochSettings or the individual fields ?
37
28
/// Inform the service a new epoch has been detected, telling it to update its
38
29
/// internal state for the new epoch.
39
30
async fn inform_epoch_settings ( & mut self , epoch_settings : EpochSettings ) -> StdResult < ( ) > ;
@@ -272,7 +263,7 @@ mod tests {
272
263
273
264
#[ tokio:: test]
274
265
async fn test_signers_with_stake_are_available_after_register_epoch_settings_call ( ) {
275
- fn build_stake_distribution ( signers : & Vec < Signer > , first_stake : u64 ) -> StakeDistribution {
266
+ fn build_stake_distribution ( signers : & [ Signer ] , first_stake : u64 ) -> StakeDistribution {
276
267
signers
277
268
. iter ( )
278
269
. enumerate ( )
0 commit comments