Merge #20302: net: Make it easier to reason about node eviction by removing unused NodeEvictionCandidate::addr (CAddress)

f1f433e8ca Make it easier to reason about node eviction by removing unused NodeEvictionCandidate::addr (CAddress) (practicalswift)

Pull request description:

  Make it easier to reason about node eviction by removing unused `NodeEvictionCandidate::addr` (`CAddress`).

ACKs for top commit:
  jnewbery:
    utACK f1f433e8ca

Tree-SHA512: fef91d7b412b8a4f172370cff6c37eb8c3db0ba618f5daf2dcc8737c8fcef7b9b820d7ee99cd0a9eae7dd653a096cf83d5113776b0d1d9a324147581674e9ede
This commit is contained in:
MarcoFalke 2020-11-05 13:00:10 +01:00
commit d94777bd52
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

@ -863,7 +863,6 @@ struct NodeEvictionCandidate
bool fRelevantServices;
bool fRelayTxes;
bool fBloomFilter;
CAddress addr;
uint64_t nKeyedNetGroup;
bool prefer_evict;
bool m_is_local;
@ -955,7 +954,7 @@ bool CConnman::AttemptToEvictConnection()
NodeEvictionCandidate candidate = {node->GetId(), node->nTimeConnected, node->nMinPingUsecTime,
node->nLastBlockTime, node->nLastTXTime,
HasAllDesirableServiceFlags(node->nServices),
peer_relay_txes, peer_filter_not_null, node->addr, node->nKeyedNetGroup,
peer_relay_txes, peer_filter_not_null, node->nKeyedNetGroup,
node->m_prefer_evict, node->addr.IsLocal()};
vEvictionCandidates.push_back(candidate);
}