disable some fastpeer code that's too expensive.

This commit is contained in:
Charles Kerr 2008-02-25 01:29:30 +00:00
parent d3779eb7d5
commit b9a9e1f1a8
1 changed files with 3 additions and 0 deletions

View File

@ -661,6 +661,8 @@ getPreferredPieces( Torrent * t,
const tr_peer * peer = peers[k]; const tr_peer * peer = peers[k];
if( peer->peerIsInterested && !peer->clientIsChoked && tr_bitfieldHas( peer->have, piece ) ) if( peer->peerIsInterested && !peer->clientIsChoked && tr_bitfieldHas( peer->have, piece ) )
++setme->peerCount; ++setme->peerCount;
#if 0
/* FIXME: this code is too expensive! */
/* The fast peer extension doesn't force a peer to actually HAVE a fast-allowed piece, /* The fast peer extension doesn't force a peer to actually HAVE a fast-allowed piece,
but we're guaranteed to get the same pieces from different peers, but we're guaranteed to get the same pieces from different peers,
so we'll build a list and pray one actually have this one */ so we'll build a list and pray one actually have this one */
@ -668,6 +670,7 @@ getPreferredPieces( Torrent * t,
/* Also, if someone SUGGESTed a piece to us, prioritize it over non-suggested others /* Also, if someone SUGGESTed a piece to us, prioritize it over non-suggested others
*/ */
setme->suggested = tr_peerMsgsIsPieceSuggested( peer->msgs, i ); setme->suggested = tr_peerMsgsIsPieceSuggested( peer->msgs, i );
#endif
} }
} }