@@ -229,7 +229,7 @@ mod benchmarks {
229229 // clean up any existing state.
230230 clear_validators_and_nominators :: < T > ( ) ;
231231
232- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
232+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
233233
234234 // setup the worst case list scenario.
235235
@@ -318,7 +318,7 @@ mod benchmarks {
318318 // clean up any existing state.
319319 clear_validators_and_nominators :: < T > ( ) ;
320320
321- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
321+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
322322
323323 // setup a worst case list scenario. Note that we don't care about the setup of the
324324 // destination position because we are doing a removal from the list but no insert.
@@ -442,7 +442,7 @@ mod benchmarks {
442442 // clean up any existing state.
443443 clear_validators_and_nominators :: < T > ( ) ;
444444
445- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
445+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
446446
447447 // setup a worst case list scenario. Note we don't care about the destination position,
448448 // because we are just doing an insert into the origin position.
@@ -475,7 +475,7 @@ mod benchmarks {
475475 // clean up any existing state.
476476 clear_validators_and_nominators :: < T > ( ) ;
477477
478- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
478+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
479479
480480 // setup a worst case list scenario. Note that we don't care about the setup of the
481481 // destination position because we are doing a removal from the list but no insert.
@@ -633,7 +633,7 @@ mod benchmarks {
633633 // Clean up any existing state.
634634 clear_validators_and_nominators :: < T > ( ) ;
635635
636- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
636+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
637637
638638 // setup a worst case list scenario. Note that we don't care about the setup of the
639639 // destination position because we are doing a removal from the list but no insert.
@@ -734,8 +734,7 @@ mod benchmarks {
734734 // clean up any existing state.
735735 clear_validators_and_nominators :: < T > ( ) ;
736736
737- let origin_weight = MinNominatorBond :: < T > :: get ( )
738- . max ( asset:: existential_deposit :: < T > ( ) )
737+ let origin_weight = Pallet :: < T > :: min_nominator_bond ( )
739738 // we use 100 to play friendly with the list threshold values in the mock
740739 . max ( 100u32 . into ( ) ) ;
741740
@@ -781,7 +780,7 @@ mod benchmarks {
781780 // clean up any existing state.
782781 clear_validators_and_nominators :: < T > ( ) ;
783782
784- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
783+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
785784
786785 // setup a worst case list scenario. Note that we don't care about the setup of the
787786 // destination position because we are doing a removal from the list but no insert.
@@ -858,7 +857,7 @@ mod benchmarks {
858857 // clean up any existing state.
859858 clear_validators_and_nominators :: < T > ( ) ;
860859
861- let origin_weight = MinNominatorBond :: < T > :: get ( ) . max ( asset :: existential_deposit :: < T > ( ) ) ;
860+ let origin_weight = Staking :: < T > :: min_nominator_bond ( ) ;
862861
863862 // setup a worst case list scenario. Note that we don't care about the setup of the
864863 // destination position because we are doing a removal from the list but no insert.
@@ -1024,14 +1023,14 @@ mod benchmarks {
10241023 let _new_validators = Rotator :: < T > :: legacy_insta_plan_era ( ) ;
10251024 // activate the previous one
10261025 Rotator :: < T > :: start_era (
1027- crate :: ActiveEraInfo { index : Rotator :: < T > :: planning_era ( ) - 1 , start : Some ( 1 ) } ,
1026+ crate :: ActiveEraInfo { index : Rotator :: < T > :: planned_era ( ) - 1 , start : Some ( 1 ) } ,
10281027 42 , // start session index doesn't really matter,
10291028 2 , // timestamp doesn't really matter
10301029 ) ;
10311030
10321031 // ensure our offender has at least a full exposure page
10331032 let offender_exposure =
1034- Eras :: < T > :: get_full_exposure ( Rotator :: < T > :: planning_era ( ) , & offender) ;
1033+ Eras :: < T > :: get_full_exposure ( Rotator :: < T > :: planned_era ( ) , & offender) ;
10351034 ensure ! (
10361035 offender_exposure. others. len( ) as u32 == 2 * T :: MaxExposurePageSize :: get( ) ,
10371036 "exposure not created"
@@ -1073,7 +1072,7 @@ mod benchmarks {
10731072 fn rc_on_offence (
10741073 v : Linear < 2 , { T :: MaxValidatorSet :: get ( ) / 2 } > ,
10751074 ) -> Result < ( ) , BenchmarkError > {
1076- let initial_era = Rotator :: < T > :: planning_era ( ) ;
1075+ let initial_era = Rotator :: < T > :: planned_era ( ) ;
10771076 let _ = crate :: testing_utils:: create_validators_with_nominators_for_era :: < T > (
10781077 2 * v,
10791078 // number of nominators is irrelevant here, so we hardcode these
@@ -1085,7 +1084,7 @@ mod benchmarks {
10851084
10861085 // plan new era
10871086 let new_validators = Rotator :: < T > :: legacy_insta_plan_era ( ) ;
1088- ensure ! ( Rotator :: <T >:: planning_era ( ) == initial_era + 1 , "era should be incremented" ) ;
1087+ ensure ! ( Rotator :: <T >:: planned_era ( ) == initial_era + 1 , "era should be incremented" ) ;
10891088 // activate the previous one
10901089 Rotator :: < T > :: start_era (
10911090 crate :: ActiveEraInfo { index : initial_era, start : Some ( 1 ) } ,
@@ -1135,7 +1134,7 @@ mod benchmarks {
11351134
11361135 #[ benchmark]
11371136 fn rc_on_session_report ( ) -> Result < ( ) , BenchmarkError > {
1138- let initial_planned_era = Rotator :: < T > :: planning_era ( ) ;
1137+ let initial_planned_era = Rotator :: < T > :: planned_era ( ) ;
11391138 let initial_active_era = Rotator :: < T > :: active_era ( ) ;
11401139
11411140 // create a small, arbitrary number of stakers. This is just for sanity of the era planning,
0 commit comments