peer.have was being initialized to the block count, rather than the piece count, resulting in wasted overhead.

This commit is contained in:
Jordan Lee 2011-09-26 22:48:50 +00:00
parent 0c4fe00658
commit bf6c2a0df7
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ getPeer( Torrent * torrent, struct peer_atom * atom )
if( peer == NULL )
{
peer = peerNew( atom );
tr_bitfieldConstruct( &peer->have, torrent->tor->blockCount );
tr_bitfieldConstruct( &peer->have, torrent->tor->info.pieceCount );
tr_bitfieldConstruct( &peer->blame, torrent->tor->blockCount );
tr_ptrArrayInsertSorted( &torrent->peers, peer, peerCompare );
}