Skip to content
Snippets Groups Projects
Commit 18609e59 authored by Éloïs's avatar Éloïs
Browse files

pallet ud: remove temporary hotfix call

parent 4868e6b1
No related branches found
No related tags found
1 merge request!102Smith members can't revoke idty nor change its address
...@@ -398,22 +398,6 @@ pub mod pallet { ...@@ -398,22 +398,6 @@ pub mod pallet {
) -> DispatchResultWithPostInfo { ) -> DispatchResultWithPostInfo {
Self::do_transfer_ud(origin, dest, value, ExistenceRequirement::KeepAlive) 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 // PUBLIC FUNCTIONS
......
...@@ -26,7 +26,6 @@ pub trait WeightInfo { ...@@ -26,7 +26,6 @@ pub trait WeightInfo {
fn claim_uds(n: u32) -> Weight; fn claim_uds(n: u32) -> Weight;
fn transfer_ud() -> Weight; fn transfer_ud() -> Weight;
fn transfer_ud_keep_alive() -> Weight; fn transfer_ud_keep_alive() -> Weight;
fn force_set_first_eligible_ud() -> Weight;
} }
// Insecure weights implementation, use it for tests only! // Insecure weights implementation, use it for tests only!
...@@ -83,11 +82,4 @@ impl WeightInfo for () { ...@@ -83,11 +82,4 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(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))
}
} }
...@@ -96,11 +96,4 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn ...@@ -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().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(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))
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment