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
825825 int64_t nMinPingUsecTime;
826826 int64_t nLastBlockTime;
827827 int64_t nLastTXTime;
828- bool fNetworkNode ;
828+ bool fRelevantServices ;
829829 bool fRelayTxes ;
830830 bool fBloomFilter ;
831831 CAddress addr;
@@ -850,7 +850,7 @@ static bool CompareNodeBlockTime(const NodeEvictionCandidate &a, const NodeEvict
850850{
851851 // There is a fall-through here because it is common for a node to have many peers which have not yet relayed a block.
852852 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 ;
854854 return a.nTimeConnected > b.nTimeConnected ;
855855}
856856
@@ -885,7 +885,8 @@ bool CConnman::AttemptToEvictConnection()
885885 if (node->fDisconnect )
886886 continue ;
887887 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,
889890 node->fRelayTxes , node->pfilter != NULL , node->addr , node->nKeyedNetGroup };
890891 vEvictionCandidates.push_back (candidate);
891892 }
You can’t perform that action at this time.
0 commit comments