@@ -42,8 +42,8 @@ pub trait EpochService: Sync + Send {
42
42
/// Get the current epoch for which the data stored in this service are computed.
43
43
fn epoch_of_current_data ( & self ) -> StdResult < Epoch > ;
44
44
45
- /// Get protocol parameters for signer registration.
46
- fn signer_registration_protocol_parameters ( & self ) -> StdResult < & ProtocolParameters > ;
45
+ /// Get protocol parameters for registration.
46
+ fn registration_protocol_parameters ( & self ) -> StdResult < & ProtocolParameters > ;
47
47
48
48
/// Get the protocol initializer for the current epoch if any
49
49
///
@@ -81,7 +81,7 @@ pub trait EpochService: Sync + Send {
81
81
82
82
pub ( crate ) struct EpochData {
83
83
pub epoch : Epoch ,
84
- pub signer_registration_protocol_parameters : ProtocolParameters ,
84
+ pub registration_protocol_parameters : ProtocolParameters ,
85
85
pub protocol_initializer : Option < ProtocolInitializer > ,
86
86
pub current_signers : Vec < Signer > ,
87
87
pub next_signers : Vec < Signer > ,
@@ -190,8 +190,7 @@ impl EpochService for MithrilEpochService {
190
190
191
191
self . epoch_data = Some ( EpochData {
192
192
epoch,
193
- signer_registration_protocol_parameters : epoch_settings
194
- . signer_registration_protocol_parameters ,
193
+ registration_protocol_parameters : epoch_settings. registration_protocol_parameters ,
195
194
protocol_initializer,
196
195
current_signers : epoch_settings. current_signers ,
197
196
next_signers : epoch_settings. next_signers ,
@@ -208,8 +207,8 @@ impl EpochService for MithrilEpochService {
208
207
Ok ( self . unwrap_data ( ) ?. epoch )
209
208
}
210
209
211
- fn signer_registration_protocol_parameters ( & self ) -> StdResult < & ProtocolParameters > {
212
- Ok ( & self . unwrap_data ( ) ?. signer_registration_protocol_parameters )
210
+ fn registration_protocol_parameters ( & self ) -> StdResult < & ProtocolParameters > {
211
+ Ok ( & self . unwrap_data ( ) ?. registration_protocol_parameters )
213
212
}
214
213
215
214
fn protocol_initializer ( & self ) -> StdResult < & Option < ProtocolInitializer > > {
@@ -352,7 +351,7 @@ impl MithrilEpochService {
352
351
353
352
let epoch_data = EpochData {
354
353
epoch,
355
- signer_registration_protocol_parameters : fake_data:: protocol_parameters ( ) ,
354
+ registration_protocol_parameters : fake_data:: protocol_parameters ( ) ,
356
355
protocol_initializer : None ,
357
356
current_signers : vec ! [ ] ,
358
357
next_signers : vec ! [ ] ,
@@ -392,7 +391,7 @@ pub mod mock_epoch_service {
392
391
393
392
fn epoch_of_current_data( & self ) -> StdResult <Epoch >;
394
393
395
- fn signer_registration_protocol_parameters ( & self ) -> StdResult <& ' static ProtocolParameters >;
394
+ fn registration_protocol_parameters ( & self ) -> StdResult <& ' static ProtocolParameters >;
396
395
397
396
fn protocol_initializer( & self ) -> StdResult <& ' static Option <ProtocolInitializer >>;
398
397
@@ -640,7 +639,7 @@ mod tests {
640
639
TestLogger :: stdout ( ) ,
641
640
) ;
642
641
assert ! ( service. epoch_of_current_data( ) . is_err( ) ) ;
643
- assert ! ( service. signer_registration_protocol_parameters ( ) . is_err( ) ) ;
642
+ assert ! ( service. registration_protocol_parameters ( ) . is_err( ) ) ;
644
643
assert ! ( service. protocol_initializer( ) . is_err( ) ) ;
645
644
assert ! ( service. current_signers( ) . is_err( ) ) ;
646
645
assert ! ( service. next_signers( ) . is_err( ) ) ;
@@ -705,8 +704,8 @@ mod tests {
705
704
service. epoch_of_current_data( ) . unwrap( )
706
705
) ;
707
706
assert_eq ! (
708
- epoch_settings. signer_registration_protocol_parameters ,
709
- * service. signer_registration_protocol_parameters ( ) . unwrap( )
707
+ epoch_settings. registration_protocol_parameters ,
708
+ * service. registration_protocol_parameters ( ) . unwrap( )
710
709
) ;
711
710
assert ! (
712
711
service. protocol_initializer( ) . unwrap( ) . is_none( ) ,
0 commit comments