1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-21 05:36:54 +00:00

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

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 );
}