File tree Expand file tree Collapse file tree 5 files changed +6
-18
lines changed
mithril-aggregator/src/dependency_injection
mithril-common/src/signable_builder Expand file tree Collapse file tree 5 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -878,7 +878,7 @@ impl DependenciesBuilder {
878
878
}
879
879
880
880
async fn build_signable_builder_service ( & mut self ) -> Result < Arc < SignableBuilderService > > {
881
- let mithril_stake_distribution_builder = MithrilStakeDistributionSignableBuilder :: new ( ) ;
881
+ let mithril_stake_distribution_builder = MithrilStakeDistributionSignableBuilder :: default ( ) ;
882
882
let immutable_signable_builder = CardanoImmutableFilesFullSignableBuilder :: new (
883
883
self . get_immutable_digester ( ) . await ?,
884
884
self . get_logger ( ) . await ?,
Original file line number Diff line number Diff line change @@ -7,21 +7,9 @@ use crate::{
7
7
} ;
8
8
9
9
/// A [MithrilStakeDistributionSignableBuilder] builder
10
+ #[ derive( Default ) ]
10
11
pub struct MithrilStakeDistributionSignableBuilder { }
11
12
12
- impl MithrilStakeDistributionSignableBuilder {
13
- /// MithrilStakeDistribution signable builder factory
14
- pub fn new ( ) -> Self {
15
- Self { }
16
- }
17
- }
18
-
19
- impl Default for MithrilStakeDistributionSignableBuilder {
20
- fn default ( ) -> Self {
21
- Self :: new ( )
22
- }
23
- }
24
-
25
13
#[ async_trait]
26
14
impl SignableBuilder < Epoch , ProtocolMessage > for MithrilStakeDistributionSignableBuilder {
27
15
// We just need to return an empty protocol message as the next AVK will be appended by the signing engine automatically
@@ -37,7 +25,7 @@ mod tests {
37
25
#[ tokio:: test]
38
26
async fn test_compute_signable ( ) {
39
27
let mithril_stake_distribution_signable_builder =
40
- MithrilStakeDistributionSignableBuilder :: new ( ) ;
28
+ MithrilStakeDistributionSignableBuilder :: default ( ) ;
41
29
let signable = mithril_stake_distribution_signable_builder
42
30
. compute_signable ( Epoch ( 1 ) )
43
31
. await
Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ mod tests {
539
539
let immutable_signable_builder =
540
540
CardanoImmutableFilesFullSignableBuilder :: new ( digester. clone ( ) , slog_scope:: logger ( ) ) ;
541
541
let mithril_stake_distribution_signable_builder =
542
- MithrilStakeDistributionSignableBuilder :: new ( ) ;
542
+ MithrilStakeDistributionSignableBuilder :: default ( ) ;
543
543
let signable_builder_service = Arc :: new ( SignableBuilderService :: new (
544
544
immutable_signable_builder,
545
545
mithril_stake_distribution_signable_builder,
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ impl<'a> ServiceBuilder for ProductionServiceBuilder<'a> {
206
206
let immutable_snapshot_builder =
207
207
CardanoImmutableFilesFullSignableBuilder :: new ( digester. clone ( ) , slog_scope:: logger ( ) ) ;
208
208
let mithril_stake_distribution_signable_builder =
209
- MithrilStakeDistributionSignableBuilder :: new ( ) ;
209
+ MithrilStakeDistributionSignableBuilder :: default ( ) ;
210
210
let signable_builder_service = Arc :: new ( SignableBuilderService :: new (
211
211
immutable_snapshot_builder,
212
212
mithril_stake_distribution_signable_builder,
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ impl StateMachineTester {
155
155
let signable_builder =
156
156
CardanoImmutableFilesFullSignableBuilder :: new ( digester. clone ( ) , slog_scope:: logger ( ) ) ;
157
157
let mithril_stake_distribution_signable_builder =
158
- MithrilStakeDistributionSignableBuilder :: new ( ) ;
158
+ MithrilStakeDistributionSignableBuilder :: default ( ) ;
159
159
let signable_builder_service = Arc :: new ( SignableBuilderService :: new (
160
160
signable_builder,
161
161
mithril_stake_distribution_signable_builder,
You can’t perform that action at this time.
0 commit comments