message: Extract upgrade test to a method.
diff: @@ -557,15 +557,11 @@ where
  if faulty_num == old_faulty_num {
  info!(era = era_id.0, "stop voting in era");
  era.consensus.deactivate_validator();
  - if let Some(upgrade_activation_point) =
  - self.era_supervisor.next_upgrade_activation_point
  - {
  + if self.should_upgrade(&era_id) {
  // If the next era is at or after the upgrade activation point, stop the node.
  - if upgrade_activation_point.should_upgrade(&era_id) {
  info!(era = era_id.0, "shutting down for upgrade");
  self.era_supervisor.stop_for_upgrade = true;
  }
  - }
  Effects::new()
  } else {
  let deactivate_era = move |_| Event::DeactivateEra {
  @@ -920,6 +916,13 @@ where
  .announce_disconnect_from_peer(sender)
  .ignore()
  }
  +
  + pub(super) fn should_upgrade(&self, era_id: &EraId) -> bool {
  + match self.era_supervisor.next_upgrade_activation_point {
  + None => false,
  + Some(upgrade_point) => upgrade_point.should_upgrade(&era_id),
  + }
  + }
  }
  /// Computes the instance ID for an era, given the state root hash, block height and chainspec.
  