Disable UD for non-members at genesis
3 unresolved threads
3 unresolved threads
- Add end2end test about UD eligibility at genesis for members or non-members
- Fix non-eligibility for non-members
- Remove implicit
IdtyData::new
- Make
FirstEligibleUd::default
explicit in doc
fixes #273 (closed)
Merge request reports
Activity
Filter activity
changed milestone to %client-0.9.1
added RN-binary RN-runtime labels
requested review from @HugoTrentesaux
removed RN-runtime label
286 286 index: idty_index, 287 287 name: common_runtime::IdtyName::from(name.as_str()), 288 288 value: common_runtime::IdtyValue { 289 data: IdtyData::new(), 289 data: IdtyData { 290 first_eligible_ud: match status { 291 common_runtime::IdtyStatus::Member => 1_u16.into(), 292 _ => gdev_runtime::pallet_universal_dividend::FirstEligibleUd(None), - Comment on lines +291 to +292
We could add a comment like this:
293 common_runtime::IdtyStatus::Member => 1_u16.into(), 294 _ => gdev_runtime::pallet_universal_dividend::FirstEligibleUd(None), 293 // only members are eligible to UD claim 294 // the first claimable UD is the first UD (number 1) 295 common_runtime::IdtyStatus::Member => 1_u16.into(), 296 _ => gdev_runtime::pallet_universal_dividend::FirstEligibleUd(None), And we could also use
FirstEligibleUd::min()
which looks less arbitrary.
22 22 pub type UdIndex = u16; 23 23 24 24 /// Represents the first eligible Universal Dividend. 25 #[derive(Clone, Default, Eq, PartialEq, RuntimeDebug, serde::Deserialize, serde::Serialize)] 25 #[derive(Clone, Eq, PartialEq, RuntimeDebug, serde::Deserialize, serde::Serialize)] 26 26 pub struct FirstEligibleUd(pub Option<NonZeroU16>); 27 27 28 /// Default is not eligible 29 impl Default for FirstEligibleUd { 30 fn default() -> Self { 31 FirstEligibleUd(None) 32 } 33 } 223 223 index: i as u32 + 1, 224 224 name: name.clone(), 225 225 value: IdtyValue { 226 data: IdtyData::new(), 226 data: IdtyData { 227 first_eligible_ud: 1_u16.into(), changed this line in version 3 of the diff
enabled an automatic merge when the pipeline for 681c10cc succeeds
mentioned in commit 33060a55
Please register or sign in to reply