message: Do no longer consider previous era validators
diff: @@ -42,7 +42,7 @@ use std::{
  collections::{BTreeMap, HashMap, HashSet},
  convert::Infallible,
  fmt::{self, Debug, Display, Formatter},
  - io, mem,
  + io,
  net::{SocketAddr, TcpListener},
  result,
  sync::{Arc, Weak},
  @@ -180,9 +180,6 @@ where
  /// The era that is considered the active era by the small network component.
  active_era: EraId,
  -
  - /// The validator set associated with the `active_era`.
  - active_era_validators: HashSet<PublicKey>,
  }
  impl<REv, P> SmallNetwork<REv, P>
  @@ -316,7 +313,6 @@ where
  incoming_limiter,
  // We start with an empty set of validators for era 0 and expect to be updated.
  active_era: EraId::new(0),
  - active_era_validators: Default::default(),
  };
  let effect_builder = EffectBuilder::new(event_queue);
  @@ -895,35 +891,21 @@ where
  ) => {
  if era_that_is_ending < self.active_era {
  debug!("ignoring past era end announcement");
  - } else if era_that_is_ending != self.active_era {
  - debug!("received upcoming era validators announcement, clearing limiters");
  - self.active_era = era_that_is_ending + 1;
  - self.active_era_validators = Default::default();
  -
  - self.incoming_limiter
  - .update_validators(Default::default(), Default::default());
  - self.outgoing_limiter
  - .update_validators(Default::default(), Default::default());
  } else {
  - // At this point we can rely on the `active_era` being the one that is ending.
  + // We have a new `active_era`, even if we may have skipped some, as this one
  + // is the highest seen.
  self.active_era = era_that_is_ending + 1;
  - // Initialize the next set of active validators with the currently active one.
  - let mut active_validators: HashSet<PublicKey> =
  - mem::take(&mut self.active_era_validators);
  -
  - self.active_era_validators = upcoming_era_validators
  + let active_validators: HashSet<PublicKey> = upcoming_era_validators
  .remove(&self.active_era)
  .unwrap_or_default()
  .into_keys()
  .collect();
  - if self.active_era_validators.is_empty() {
  + if active_validators.is_empty() {
  error!("received an empty set of active era validators");
  }
  - active_validators.extend(self.active_era_validators.iter().cloned());
  -
  let upcoming_validators: HashSet<PublicKey> = upcoming_era_validators
  .remove(&(self.active_era + 1))
  .unwrap_or_default()
  