message: [refactor] Remove IsOutboundDisconnectionCandidate
diff: @@ -841,11 +841,6 @@ void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds)
  if (state) state->m_last_block_announcement = time_in_seconds;
  }
  -static bool IsOutboundDisconnectionCandidate(const CNode& node)
  -{
  - return node.IsOutboundOrBlockRelayConn();
  -}
  -
  void PeerLogicValidation::InitializeNode(CNode *pnode) {
  CAddress addr = pnode->addr;
  std::string addrName = pnode->GetAddrName();
  @@ -1987,14 +1982,14 @@ static void ProcessHeadersMessage(CNode& pfrom, CConnman& connman, ChainstateMan
  // until we have a headers chain that has at least
  // nMinimumChainWork, even if a peer has a chain past our tip,
  // as an anti-DoS measure.
  - if (IsOutboundDisconnectionCandidate(pfrom)) {
  + if (pfrom.IsOutboundOrBlockRelayConn()) {
  LogPrintf("Disconnecting outbound peer %d -- headers chain has insufficient work\n", pfrom.GetId());
  pfrom.fDisconnect = true;
  }
  }
  }
  - if (!pfrom.fDisconnect && IsOutboundDisconnectionCandidate(pfrom) && nodestate->pindexBestKnownBlock != nullptr && pfrom.m_tx_relay != nullptr) {
  + if (!pfrom.fDisconnect && pfrom.IsOutboundOrBlockRelayConn() && nodestate->pindexBestKnownBlock != nullptr && pfrom.m_tx_relay != nullptr) {
  // If this is an outbound full-relay peer, check to see if we should protect
  // it from the bad/lagging chain logic.
  // Note that block-relay-only peers are already implicitly protected, so we
  @@ -4021,7 +4016,7 @@ void PeerLogicValidation::ConsiderEviction(CNode& pto, int64_t time_in_seconds)
  CNodeState &state = *State(pto.GetId());
  const CNetMsgMaker msgMaker(pto.GetSendVersion());
  - if (!state.m_chain_sync.m_protect && IsOutboundDisconnectionCandidate(pto) && state.fSyncStarted) {
  + if (!state.m_chain_sync.m_protect && pto.IsOutboundOrBlockRelayConn() && state.fSyncStarted) {
  // This is an outbound peer subject to disconnection if they don't
  // announce a block with as much work as the current tip within
  // CHAIN_SYNC_TIMEOUT + HEADERS_RESPONSE_TIME seconds (note: if
  @@ -4083,7 +4078,7 @@ void PeerLogicValidation::EvictExtraOutboundPeers(int64_t time_in_seconds)
  AssertLockHeld(cs_main);
  // Ignore non-outbound peers, or nodes marked for disconnect already
  - if (!IsOutboundDisconnectionCandidate(*pnode) || pnode->fDisconnect) return;
  + if (!pnode->IsOutboundOrBlockRelayConn() || pnode->fDisconnect) return;
  CNodeState *state = State(pnode->GetId());
  if (state == nullptr) return; // shouldn't be possible, but just in case
  // Don't evict our protected peers
  