do the low-CPU tests first when deciding which blocks to request. these get called a /lot/ during endgame.

This commit is contained in:
Charles Kerr 2007-07-24 11:47:59 +00:00
parent b74e6a3c12
commit 7326f4db32
1 changed files with 2 additions and 2 deletions

View File

@ -185,10 +185,10 @@ static int isBlockInteresting( const tr_torrent_t * tor,
const tr_peer_t * peer,
int block )
{
if( !isPieceInteresting( tor, peer, tr_blockPiece( block ) ) ) /* is piece interesting? */
if( tr_cpBlockIsComplete( tor->completion, block )) /* we already have it */
return 0;
if( tr_cpBlockIsComplete( tor->completion, block )) /* we already have it */
if( !isPieceInteresting( tor, peer, tr_blockPiece( block ))) /* is piece interesting? */
return 0;
return 1;