@@ -1150,7 +1150,7 @@ pub mod pallet {
11501150 DuplicateIndex ,
11511151 /// Slash record not found.
11521152 InvalidSlashRecord ,
1153- /// Cannot have a validator or nominator role, with value less than the minimum defined by
1153+ /// Cannot bond, nominate or validate with value less than the minimum defined by
11541154 /// governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the
11551155 /// intention, `chill` first to remove one's role as validator/nominator.
11561156 InsufficientBond ,
@@ -1308,7 +1308,7 @@ pub mod pallet {
13081308 }
13091309
13101310 // Reject a bond which is lower than the minimum bond.
1311- if value < Self :: min_bond ( ) {
1311+ if value < Self :: min_chilled_bond ( ) {
13121312 return Err ( Error :: < T > :: InsufficientBond . into ( ) ) ;
13131313 }
13141314
@@ -1407,9 +1407,9 @@ pub mod pallet {
14071407 }
14081408
14091409 let min_active_bond = if Nominators :: < T > :: contains_key ( & stash) {
1410- MinNominatorBond :: < T > :: get ( )
1410+ Self :: min_nominator_bond ( )
14111411 } else if Validators :: < T > :: contains_key ( & stash) {
1412- MinValidatorBond :: < T > :: get ( )
1412+ Self :: min_validator_bond ( )
14131413 } else {
14141414 // staker is chilled, no min bond.
14151415 Zero :: zero ( )
@@ -1493,7 +1493,7 @@ pub mod pallet {
14931493
14941494 let ledger = Self :: ledger ( Controller ( controller) ) ?;
14951495
1496- ensure ! ( ledger. active >= MinValidatorBond :: < T > :: get ( ) , Error :: <T >:: InsufficientBond ) ;
1496+ ensure ! ( ledger. active >= Self :: min_validator_bond ( ) , Error :: <T >:: InsufficientBond ) ;
14971497 let stash = & ledger. stash ;
14981498
14991499 // ensure their commission is correct.
@@ -1534,7 +1534,7 @@ pub mod pallet {
15341534
15351535 let ledger = Self :: ledger ( StakingAccount :: Controller ( controller. clone ( ) ) ) ?;
15361536
1537- ensure ! ( ledger. active >= MinNominatorBond :: < T > :: get ( ) , Error :: <T >:: InsufficientBond ) ;
1537+ ensure ! ( ledger. active >= Self :: min_nominator_bond ( ) , Error :: <T >:: InsufficientBond ) ;
15381538 let stash = & ledger. stash ;
15391539
15401540 // Only check limits if they are not already a nominator.
@@ -1889,7 +1889,7 @@ pub mod pallet {
18891889 let initial_unlocking = ledger. unlocking . len ( ) as u32 ;
18901890 let ( ledger, rebonded_value) = ledger. rebond ( value) ;
18911891 // Last check: the new active amount of ledger must be more than min bond.
1892- ensure ! ( ledger. active >= Self :: min_bond ( ) , Error :: <T >:: InsufficientBond ) ;
1892+ ensure ! ( ledger. active >= Self :: min_chilled_bond ( ) , Error :: <T >:: InsufficientBond ) ;
18931893
18941894 Self :: deposit_event ( Event :: < T > :: Bonded {
18951895 stash : ledger. stash . clone ( ) ,
@@ -1942,13 +1942,13 @@ pub mod pallet {
19421942 // virtual stakers should not be allowed to be reaped.
19431943 ensure ! ( !Self :: is_virtual_staker( & stash) , Error :: <T >:: VirtualStakerNotAllowed ) ;
19441944
1945- let min_bond = Self :: min_bond ( ) ;
1945+ let min_chilled_bond = Self :: min_chilled_bond ( ) ;
19461946 let origin_balance = asset:: total_balance :: < T > ( & stash) ;
19471947 let ledger_total =
19481948 Self :: ledger ( Stash ( stash. clone ( ) ) ) . map ( |l| l. total ) . unwrap_or_default ( ) ;
1949- let reapable = origin_balance < min_bond ||
1949+ let reapable = origin_balance < min_chilled_bond ||
19501950 origin_balance. is_zero ( ) ||
1951- ledger_total < min_bond ||
1951+ ledger_total < min_chilled_bond ||
19521952 ledger_total. is_zero ( ) ;
19531953 ensure ! ( reapable, Error :: <T >:: FundedTarget ) ;
19541954
@@ -2123,7 +2123,7 @@ pub mod pallet {
21232123 threshold * max_nominator_count < current_nominator_count,
21242124 Error :: <T >:: CannotChillOther
21252125 ) ;
2126- MinNominatorBond :: < T > :: get ( )
2126+ Self :: min_nominator_bond ( )
21272127 } else if Validators :: < T > :: contains_key ( & stash) {
21282128 let max_validator_count =
21292129 MaxValidatorsCount :: < T > :: get ( ) . ok_or ( Error :: < T > :: CannotChillOther ) ?;
@@ -2132,7 +2132,7 @@ pub mod pallet {
21322132 threshold * max_validator_count < current_validator_count,
21332133 Error :: <T >:: CannotChillOther
21342134 ) ;
2135- MinValidatorBond :: < T > :: get ( )
2135+ Self :: min_validator_bond ( )
21362136 } else {
21372137 Zero :: zero ( )
21382138 } ;
0 commit comments