diff --git a/live-tests/tests/sanity_gdev.rs b/live-tests/tests/sanity_gdev.rs index d0ae6434cea09c3cb995e0b308d25eb71fee32c1..e326b7191eed13d800e1cadca7e0d04632dc4828 100644 --- a/live-tests/tests/sanity_gdev.rs +++ b/live-tests/tests/sanity_gdev.rs @@ -156,8 +156,6 @@ mod verifier { Self { errors: Vec::new() } } - // FIXME why async functions when called with await? - /// method to run all storage tests pub(super) async fn verify_storage(&mut self, storage: &Storage) -> anyhow::Result<()> { self.verify_accounts(&storage.accounts).await; diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs index a776c8182514ac92f7ed5eca4ceab88e150470a7..cbfa3e9ef6e5828d928f2e3da3bc83f3dad9aff5 100644 --- a/pallets/distance/src/lib.rs +++ b/pallets/distance/src/lib.rs @@ -439,10 +439,9 @@ pub mod pallet { idty_index: <T as pallet_identity::Config>::IdtyIndex, ) -> Result<(), DispatchError> { Pallet::<T>::mutate_current_pool( - pallet_session::CurrentIndex::<T>::get(), // TODO look + pallet_session::CurrentIndex::<T>::get(), |current_pool| { - // TODO not needed if called in extrinsics only - // since extrinsics are transactional by default + // extrinsics are transactional by default, this check might not be needed ensure!( current_pool.evaluations.len() < (MAX_EVALUATIONS_PER_SESSION as usize), Error::<T>::QueueFull diff --git a/pallets/duniter-wot/src/lib.rs b/pallets/duniter-wot/src/lib.rs index f7c0090340b5c5e219d9a862f6fa19e80c857a79..67961a5a1a559844d4d26bee3551e10984fd2ef3 100644 --- a/pallets/duniter-wot/src/lib.rs +++ b/pallets/duniter-wot/src/lib.rs @@ -230,7 +230,7 @@ impl<T: Config> pallet_identity::traits::OnIdtyChange<T> for Pallet<T> { } } } - // TODO split in removed / revoked in two events: + // we could split this event in removed / revoked: // if identity is revoked keep it // if identity is removed also remove certs IdtyEvent::Removed { status } => { diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index f699a24c0296b7551906010dbb2e755031aa8620..36884fba8e82d5cd8a0ca871fbd056cd23cf6e7f 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -93,7 +93,7 @@ pub mod pallet { type AccountIdOf: Convert<Self::IdtyId, Option<Self::AccountId>>; #[pallet::constant] /// Maximum life span of a single membership (in number of blocks) - // TODO this could be renamed "validity" or "duration" + // (this could be renamed "validity" or "duration") type MembershipPeriod: Get<Self::BlockNumber>; /// Minimum delay to wait before renewing membership // i.e. asking for distance evaluation diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index be744570ea9d9e85ec20262738c2e7149eadb01d..92ae7c7dfe947911f12b964cb54573f0a18f8ac3 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -97,14 +97,14 @@ pub mod pallet { #[pallet::getter(fn current_ud)] pub type CurrentUd<T: Config> = StorageValue<_, BalanceOf<T>, ValueQuery>; + // default value for number of the next UD #[pallet::type_value] pub fn DefaultForCurrentUdIndex() -> UdIndex { - // FIXME seems off by 1 - // or rename to "next" ud index instead of "current" ud index 1 } /// Current UD index + // (more like the index of the ongoing UD = the next one) #[pallet::storage] #[pallet::getter(fn ud_index)] pub type CurrentUdIndex<T: Config> = @@ -268,7 +268,6 @@ pub mod pallet { // Increment ud index let ud_index = CurrentUdIndex::<T>::mutate(|next_ud_index| { - // FIXME seems off by 1 due to default to 1 core::mem::replace(next_ud_index, next_ud_index.saturating_add(1)) }); diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 6f1dbc89d94f221a40058afef6c28a7383bb8188..55eba276c9e109c554822c1766bc5ddb19eedb7d 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -481,8 +481,8 @@ fn test_identity_creation_workflow() { Identity::identity(5), Some(pallet_identity::IdtyValue { data: IdtyData { - // ud creation period is 60_000 ms ~ 10 blocks // block time is 6_000 ms + // ud creation period is 60_000 ms ~ 10 blocks // first ud is at 24_000 ms ~ 4 blocks // at block 75 this should be the UD number 7, so next is 8 not 9 // FIXME wrong UD count @@ -583,7 +583,6 @@ fn test_membership_renewal() { run_to_block(76); // not possible to renew manually // can not ask renewal when period is not respected - // TODO check that it is possible again within the right delay assert_noop!( Distance::request_distance_evaluation( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(),