@@ -30,19 +30,6 @@ pub trait Runner: Send + Sync {
30
30
/// Fetch the current time point from the Cardano node.
31
31
async fn get_current_time_point ( & self ) -> StdResult < TimePoint > ;
32
32
33
- /// Get the current signers.
34
- /// // TODO return a &Vec
35
- async fn get_current_signers ( & self ) -> StdResult < Vec < Signer > > ;
36
-
37
- /// Get the next signers.
38
- async fn get_next_signers ( & self ) -> StdResult < Vec < Signer > > ;
39
-
40
- /// Get the next signers with their stake.
41
- async fn get_current_signers_with_stake ( & self ) -> StdResult < Vec < SignerWithStake > > ;
42
-
43
- /// Get the next signers with their stake.
44
- async fn get_next_signers_with_stake ( & self ) -> StdResult < Vec < SignerWithStake > > ;
45
-
46
33
/// Register the signer verification key to the aggregator.
47
34
async fn register_signer_to_aggregator ( & self ) -> StdResult < ( ) > ;
48
35
@@ -110,6 +97,26 @@ impl SignerRunner {
110
97
pub fn new ( config : Configuration , services : SignerDependencyContainer ) -> Self {
111
98
Self { services, config }
112
99
}
100
+
101
+ /// Get the current signers with their stake.
102
+ async fn get_current_signers_with_stake ( & self ) -> StdResult < Vec < SignerWithStake > > {
103
+ self . services
104
+ . epoch_service
105
+ . read ( )
106
+ . await
107
+ . current_signers_with_stake ( )
108
+ . await
109
+ }
110
+
111
+ /// Get the next signers with their stake.
112
+ async fn get_next_signers_with_stake ( & self ) -> StdResult < Vec < SignerWithStake > > {
113
+ self . services
114
+ . epoch_service
115
+ . read ( )
116
+ . await
117
+ . next_signers_with_stake ( )
118
+ . await
119
+ }
113
120
}
114
121
115
122
#[ cfg_attr( test, automock) ]
@@ -145,48 +152,6 @@ impl Runner for SignerRunner {
145
152
. with_context ( || "Runner can not get current time point" )
146
153
}
147
154
148
- async fn get_current_signers ( & self ) -> StdResult < Vec < Signer > > {
149
- debug ! ( "RUNNER: get_current_signers" ) ;
150
-
151
- self . services
152
- . epoch_service
153
- . read ( )
154
- . await
155
- . current_signers ( )
156
- . cloned ( )
157
- }
158
-
159
- async fn get_next_signers ( & self ) -> StdResult < Vec < Signer > > {
160
- debug ! ( "RUNNER: get_next_signers" ) ;
161
-
162
- self . services
163
- . epoch_service
164
- . read ( )
165
- . await
166
- . next_signers ( )
167
- . cloned ( )
168
- }
169
-
170
- /// Get the current signers with their stake.
171
- async fn get_current_signers_with_stake ( & self ) -> StdResult < Vec < SignerWithStake > > {
172
- self . services
173
- . epoch_service
174
- . read ( )
175
- . await
176
- . current_signers_with_stake ( )
177
- . await
178
- }
179
-
180
- /// Get the next signers with their stake.
181
- async fn get_next_signers_with_stake ( & self ) -> StdResult < Vec < SignerWithStake > > {
182
- self . services
183
- . epoch_service
184
- . read ( )
185
- . await
186
- . next_signers_with_stake ( )
187
- . await
188
- }
189
-
190
155
async fn register_signer_to_aggregator ( & self ) -> StdResult < ( ) > {
191
156
debug ! ( "RUNNER: register_signer_to_aggregator" ) ;
192
157
0 commit comments