@@ -865,9 +865,10 @@ pub trait Trait: frame_system::Trait + SendTransactionTypes<Call<Self>> {
865
865
/// Number of eras that staked funds must remain bonded for.
866
866
type BondingDuration : Get < EraIndex > ;
867
867
868
- /// Number of eras that slashes are deferred by, after computation. This should be less than the
869
- /// bonding duration. Set to 0 if slashes should be applied immediately, without opportunity for
870
- /// intervention.
868
+ /// Number of eras that slashes are deferred by, after computation.
869
+ ///
870
+ /// This should be less than the bonding duration. Set to 0 if slashes
871
+ /// should be applied immediately, without opportunity for intervention.
871
872
type SlashDeferDuration : Get < EraIndex > ;
872
873
873
874
/// The origin which can cancel a deferred slash. Root can always do this.
@@ -884,6 +885,7 @@ pub trait Trait: frame_system::Trait + SendTransactionTypes<Call<Self>> {
884
885
type NextNewSession : EstimateNextNewSession < Self :: BlockNumber > ;
885
886
886
887
/// The number of blocks before the end of the era from which election submissions are allowed.
888
+ ///
887
889
/// Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will
888
890
/// be used.
889
891
///
@@ -894,14 +896,15 @@ pub trait Trait: frame_system::Trait + SendTransactionTypes<Call<Self>> {
894
896
/// The overarching call type.
895
897
type Call : Dispatchable + From < Call < Self > > + IsSubType < Module < Self > , Self > + Clone ;
896
898
897
- /// Maximum number of balancing iterations to run in the offchain submission. If set to 0,
898
- /// balance_solution will not be executed at all.
899
+ /// Maximum number of balancing iterations to run in the offchain submission.
900
+ ///
901
+ /// If set to 0, balance_solution will not be executed at all.
899
902
type MaxIterations : Get < u32 > ;
900
903
901
904
/// The threshold of improvement that should be provided for a new solution to be accepted.
902
905
type MinSolutionScoreBump : Get < Perbill > ;
903
906
904
- /// The maximum number of nominator rewarded for each validator.
907
+ /// The maximum number of nominators rewarded for each validator.
905
908
///
906
909
/// For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim
907
910
/// their reward. This used to limit the i/o cost for the nominator payout.
@@ -1275,6 +1278,36 @@ decl_module! {
1275
1278
/// Number of eras that staked funds must remain bonded for.
1276
1279
const BondingDuration : EraIndex = T :: BondingDuration :: get( ) ;
1277
1280
1281
+ /// Number of eras that slashes are deferred by, after computation.
1282
+ ///
1283
+ /// This should be less than the bonding duration.
1284
+ /// Set to 0 if slashes should be applied immediately, without opportunity for
1285
+ /// intervention.
1286
+ const SlashDeferDuration : EraIndex = T :: SlashDeferDuration :: get( ) ;
1287
+
1288
+ /// The number of blocks before the end of the era from which election submissions are allowed.
1289
+ ///
1290
+ /// Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will
1291
+ /// be used.
1292
+ ///
1293
+ /// This is bounded by being within the last session. Hence, setting it to a value more than the
1294
+ /// length of a session will be pointless.
1295
+ const ElectionLookahead : T :: BlockNumber = T :: ElectionLookahead :: get( ) ;
1296
+
1297
+ /// Maximum number of balancing iterations to run in the offchain submission.
1298
+ ///
1299
+ /// If set to 0, balance_solution will not be executed at all.
1300
+ const MaxIterations : u32 = T :: MaxIterations :: get( ) ;
1301
+
1302
+ /// The threshold of improvement that should be provided for a new solution to be accepted.
1303
+ const MinSolutionScoreBump : Perbill = T :: MinSolutionScoreBump :: get( ) ;
1304
+
1305
+ /// The maximum number of nominators rewarded for each validator.
1306
+ ///
1307
+ /// For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim
1308
+ /// their reward. This used to limit the i/o cost for the nominator payout.
1309
+ const MaxNominatorRewardedPerValidator : u32 = T :: MaxNominatorRewardedPerValidator :: get( ) ;
1310
+
1278
1311
type Error = Error <T >;
1279
1312
1280
1313
fn deposit_event( ) = default ;
0 commit comments