diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index 78be0ed1da08939ff656b8e4712cd03a427b2b23..faf5749d2fdcf667822228ae045d17364147e28d 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -398,22 +398,6 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { Self::do_transfer_ud(origin, dest, value, ExistenceRequirement::KeepAlive) } - - #[pallet::weight(T::WeightInfo::force_set_first_eligible_ud())] - pub fn force_set_first_eligible_ud( - origin: OriginFor<T>, - who: T::AccountId, - first_eligible_ud: FirstEligibleUd, - ) -> DispatchResultWithPostInfo { - ensure_root(origin)?; - - T::MembersStorage::try_mutate_exists(&who, |maybe_first_eligible_ud| { - if let Some(ref mut first_eligible_ud_) = maybe_first_eligible_ud { - *first_eligible_ud_ = first_eligible_ud; - } - Ok(().into()) - }) - } } // PUBLIC FUNCTIONS diff --git a/pallets/universal-dividend/src/weights.rs b/pallets/universal-dividend/src/weights.rs index 9fa338ccfc23e1b1d551108482345d5861b5a767..e3b860880991e7c3aa5e7cd04fb8a67c5d6418e2 100644 --- a/pallets/universal-dividend/src/weights.rs +++ b/pallets/universal-dividend/src/weights.rs @@ -26,7 +26,6 @@ pub trait WeightInfo { fn claim_uds(n: u32) -> Weight; fn transfer_ud() -> Weight; fn transfer_ud_keep_alive() -> Weight; - fn force_set_first_eligible_ud() -> Weight; } // Insecure weights implementation, use it for tests only! @@ -83,11 +82,4 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } - // Storage: Identity IdentityIndexOf (r:1 w:0) - // Storage: Identity Identities (r:1 w:1) - fn force_set_first_eligible_ud() -> Weight { - (0 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } } diff --git a/runtime/common/src/weights/pallet_universal_dividend.rs b/runtime/common/src/weights/pallet_universal_dividend.rs index d5b7bfcab636af7d843cc7412084ec622578e445..9c9efb8f91e8e234a80a53cd082edf33c3668d3c 100644 --- a/runtime/common/src/weights/pallet_universal_dividend.rs +++ b/runtime/common/src/weights/pallet_universal_dividend.rs @@ -96,11 +96,4 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - // Storage: Identity IdentityIndexOf (r:1 w:0) - // Storage: Identity Identities (r:1 w:1) - fn force_set_first_eligible_ud() -> Weight { - (57_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } }