Skip to content

Commit

Permalink
amend proof comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat committed Nov 27, 2023
1 parent 9c5e772 commit 95ee59c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions substrate/frame/staking/src/pallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ pub mod pallet {
// (temporary) passive migration.
Self::ledger(StakingAccount::Stash(stash.clone())).map(|ledger| {
let controller = ledger.controller()
.defensive_proof("ledger was fetched used the StakingInterface, so controller field must exist; qed.")
.defensive_proof("ledger was fetched using StakingLedger, so controller field must exist; qed.")
.ok_or(Error::<T>::NotController)?;

if controller == stash {
Expand Down Expand Up @@ -1768,8 +1768,11 @@ pub mod pallet {
// Anyone can call this function.
let caller = ensure_signed(origin)?;
let ledger = Self::ledger(Stash(stash.clone()))?;
let controller = ledger.controller()
.defensive_proof("ledger was fetched used the StakingInterface, so controller field must exist; qed.")
let controller = ledger
.controller()
.defensive_proof(
"ledger was fetched using StakingLedger, so controller field must exist; qed.",
)
.ok_or(Error::<T>::NotController)?;

// In order for one user to chill another user, the following conditions must be met:
Expand Down

0 comments on commit 95ee59c

Please sign in to comment.