BREAKING: Rename Origin (#12258)

* BREAKING: Rename Origin

* more renaming

* a bit more renaming

* fix

* more fixing

* fix in frame_support

* even more fixes

* fix

* small fix

* ...

* update .stderr

* docs

* update docs

* update docs

* docs
This commit is contained in:
Sergej Sakac
2022-09-21 00:13:09 +02:00
committed by GitHub
parent 986d20b352
commit e4b6f4a66d
221 changed files with 5233 additions and 4200 deletions
+6 -6
View File
@@ -155,7 +155,7 @@ pub mod pallet {
type SlashDeferDuration: Get<EraIndex>;
/// The origin which can cancel a deferred slash. Root can always do this.
type SlashCancelOrigin: EnsureOrigin<Self::Origin>;
type SlashCancelOrigin: EnsureOrigin<Self::RuntimeOrigin>;
/// Interface for interacting with a session pallet.
type SessionInterface: SessionInterface<Self::AccountId>;
@@ -608,18 +608,18 @@ pub mod pallet {
"Stash does not have enough balance to bond."
);
frame_support::assert_ok!(<Pallet<T>>::bond(
T::Origin::from(Some(stash.clone()).into()),
T::RuntimeOrigin::from(Some(stash.clone()).into()),
T::Lookup::unlookup(controller.clone()),
balance,
RewardDestination::Staked,
));
frame_support::assert_ok!(match status {
crate::StakerStatus::Validator => <Pallet<T>>::validate(
T::Origin::from(Some(controller.clone()).into()),
T::RuntimeOrigin::from(Some(controller.clone()).into()),
Default::default(),
),
crate::StakerStatus::Nominator(votes) => <Pallet<T>>::nominate(
T::Origin::from(Some(controller.clone()).into()),
T::RuntimeOrigin::from(Some(controller.clone()).into()),
votes.iter().map(|l| T::Lookup::unlookup(l.clone())).collect(),
),
_ => Ok(()),
@@ -1476,7 +1476,7 @@ pub mod pallet {
/// Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an
/// accurate number.
///
/// Origin must be root.
/// RuntimeOrigin must be root.
///
/// # <weight>
/// - E: Number of history depths removed, i.e. 10 -> 7 = 3
@@ -1593,7 +1593,7 @@ pub mod pallet {
/// * `min_commission`: The minimum amount of commission that each validators must maintain.
/// This is checked only upon calling `validate`. Existing validators are not affected.
///
/// Origin must be Root to call this function.
/// RuntimeOrigin must be Root to call this function.
///
/// NOTE: Existing nominators and validators will not be affected by this update.
/// to kick people under the new limits, `chill_other` should be called.