File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -809,7 +809,7 @@ struct NodeEvictionCandidate
809
809
int64_t nMinPingUsecTime;
810
810
int64_t nLastBlockTime;
811
811
int64_t nLastTXTime;
812
- bool fNetworkNode ;
812
+ bool fRelevantServices ;
813
813
bool fRelayTxes ;
814
814
bool fBloomFilter ;
815
815
CAddress addr;
@@ -834,7 +834,7 @@ static bool CompareNodeBlockTime(const NodeEvictionCandidate &a, const NodeEvict
834
834
{
835
835
// There is a fall-through here because it is common for a node to have many peers which have not yet relayed a block.
836
836
if (a.nLastBlockTime != b.nLastBlockTime ) return a.nLastBlockTime < b.nLastBlockTime ;
837
- if (a.fNetworkNode != b.fNetworkNode ) return b.fNetworkNode ;
837
+ if (a.fRelevantServices != b.fRelevantServices ) return b.fRelevantServices ;
838
838
return a.nTimeConnected > b.nTimeConnected ;
839
839
}
840
840
@@ -869,7 +869,8 @@ bool CConnman::AttemptToEvictConnection()
869
869
if (node->fDisconnect )
870
870
continue ;
871
871
NodeEvictionCandidate candidate = {node->id , node->nTimeConnected , node->nMinPingUsecTime ,
872
- node->nLastBlockTime , node->nLastTXTime , node->fNetworkNode ,
872
+ node->nLastBlockTime , node->nLastTXTime ,
873
+ (node->nServices & nRelevantServices) == nRelevantServices,
873
874
node->fRelayTxes , node->pfilter != NULL , node->addr , node->nKeyedNetGroup };
874
875
vEvictionCandidates.push_back (candidate);
875
876
}
You can’t perform that action at this time.
0 commit comments