From bf6c2a0df73555456eb24028100bbcc827b921b4 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Mon, 26 Sep 2011 22:48:50 +0000 Subject: [PATCH] peer.have was being initialized to the block count, rather than the piece count, resulting in wasted overhead. --- libtransmission/peer-mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 044bb8da8..1a773df53 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -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 ); }