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 @@ -825,7 +825,7 @@ struct NodeEvictionCandidate
825
825
int64_t nMinPingUsecTime;
826
826
int64_t nLastBlockTime;
827
827
int64_t nLastTXTime;
828
- bool fNetworkNode ;
828
+ bool fRelevantServices ;
829
829
bool fRelayTxes ;
830
830
bool fBloomFilter ;
831
831
CAddress addr;
@@ -850,7 +850,7 @@ static bool CompareNodeBlockTime(const NodeEvictionCandidate &a, const NodeEvict
850
850
{
851
851
// There is a fall-through here because it is common for a node to have many peers which have not yet relayed a block.
852
852
if (a.nLastBlockTime != b.nLastBlockTime ) return a.nLastBlockTime < b.nLastBlockTime ;
853
- if (a.fNetworkNode != b.fNetworkNode ) return b.fNetworkNode ;
853
+ if (a.fRelevantServices != b.fRelevantServices ) return b.fRelevantServices ;
854
854
return a.nTimeConnected > b.nTimeConnected ;
855
855
}
856
856
@@ -885,7 +885,8 @@ bool CConnman::AttemptToEvictConnection()
885
885
if (node->fDisconnect )
886
886
continue ;
887
887
NodeEvictionCandidate candidate = {node->id , node->nTimeConnected , node->nMinPingUsecTime ,
888
- node->nLastBlockTime , node->nLastTXTime , node->fNetworkNode ,
888
+ node->nLastBlockTime , node->nLastTXTime ,
889
+ (node->nServices & nRelevantServices) == nRelevantServices,
889
890
node->fRelayTxes , node->pfilter != NULL , node->addr , node->nKeyedNetGroup };
890
891
vEvictionCandidates.push_back (candidate);
891
892
}
You can’t perform that action at this time.
0 commit comments