Document more TODOs as tickets (#1418)

Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.
This commit is contained in:
Benjamin Kampmann
2019-01-30 10:29:48 +01:00
committed by GitHub
parent d2cfd7b9dc
commit 15ae7cfef6
59 changed files with 65 additions and 142 deletions
+2 -2
View File
@@ -138,7 +138,7 @@ decl_storage! {
impl<T: Trait> Module<T> {
/// The number of validators currently.
pub fn validator_count() -> u32 {
<Validators<T>>::get().len() as u32 // TODO: can probably optimised
<Validators<T>>::get().len() as u32
}
/// The last length change, if there was one, zero if not.
@@ -158,7 +158,7 @@ impl<T: Trait> Module<T> {
/// Called by `staking::new_era()` only. `next_session` should be called after this in order to
/// update the session keys to the next validator set.
pub fn set_validators(new: &[T::AccountId]) {
<Validators<T>>::put(&new.to_vec()); // TODO: optimise.
<Validators<T>>::put(&new.to_vec());
<consensus::Module<T>>::set_authorities(
&new.iter().cloned().map(T::ConvertAccountIdToSessionKey::convert).collect::<Vec<_>>()
);