message: Add draft version of new check for consensus and appropriate TODO.
diff: @@ -52,8 +52,11 @@ pub fn check_nodes_responses_on_status(nodes_votes: &HashMap<(String, usize, Opt
  node_cnt: usize,
  f: usize,
  pool_name: &str) -> IndyResult<CatchupProgress> {
  + //FIXME fetch not just most popular vote but most popular not a timeout
  if let Some((most_popular_vote, votes_cnt)) = nodes_votes.iter().map(|(key, val)| (key, val.len())).max_by_key(|entry| entry.1) {
  - let is_consensus_reached = votes_cnt == node_cnt - f;
  + let is_consensus_reached =
  + votes_cnt == node_cnt - f
  + || votes_cnt == f + 1 && most_popular_vote.0.neq("timeout");
  if is_consensus_reached {
  if most_popular_vote.0.eq("timeout") {
  return _try_to_restart_catch_up(pool_name, err_msg(IndyErrorKind::PoolTimeout, "Pool timeout"))
  @@ -72,6 +75,7 @@ pub fn check_nodes_responses_on_status(nodes_votes: &HashMap<(String, usize, Opt
  let positive_votes_cnt = votes_cnt + (node_cnt - reps_cnt);
  let is_consensus_reachable = positive_votes_cnt < node_cnt - f;
  if is_consensus_reachable {
  + //TODO: maybe we should change the error, but it was made to escape changing of ErrorCode returned to client
  return _try_to_restart_catch_up(pool_name, err_msg(IndyErrorKind::PoolTimeout, "No consensus possible"))
  }
  }
  @@ -84,7 +88,6 @@ fn _try_to_restart_catch_up(pool_name: &str, err: IndyError) -> IndyResult<Catch
  let merkle_tree = merkle_tree_factory::create(pool_name)?;
  return Ok(CatchupProgress::Restart(merkle_tree))
  } else {
  - //TODO: maybe we should change the error, but it was made to escape changing of ErrorCode returned to client
  return Err(err);
  }
  }
  