(libT) when picking peers to connect to, all other things being equal, pick peers from more reliable sources

This commit is contained in:
Charles Kerr
2008-12-03 01:22:24 +00:00
parent e581bc01f7
commit 761d7dba8e

View File

@@ -2124,6 +2124,11 @@ compareCandidates( const void * va,
if( a->time != b->time )
return a->time < b->time ? -1 : 1;
/* all other things being equal, prefer peers whose
* information comes from a more reliable source */
if( a->from != b->from )
return a->from < b->from ? -1 : 1;
return 0;
}