[BitTorrent] Help with BT source code.

Paulo S Silva Jr mstrcontrol at yahoo.com
Thu Feb 10 16:17:08 EST 2005



Greetings,

Well I know it's a very basic question but I'm having a little 
dificulty in putting this up correctly. As you may know I'm porting 
the BT to VB.NET so I'm examining the BT (BitTornado) source code in 
order to compare both functionality and performance. And so far so 
good.

But there's one little thing I don't get it. In the "statistcs.py" 
starting at the line 90 we have...

s.numCopies2 = 0.0
for i in self.picker.crosscount2:
    if i==0:
        s.numCopies2+=1
    else:
        s.numCopies2+=1-float(i)/self.picker.numpieces
        break

and from what I've gathered it calculates the number of complete 
torrents on the swarm (even if there's no seed on it).

If I'm following the code right, let's say that we have a swarm that 
is made of only 3 peers and a torrent with only 3 pieces as follow

Peer1 has piece (1)
Peer2 has piece (2)
Peer3 has pieces (1, 2)

As we can see in this little swarm we don't have a complete torrent 
(there's only availabe pieces 1 and 2) but BT reports as seing a 
complete set.

How can it be? Or I'm reading the code wrongly?

MstrControl





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/BitTorrent/

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the BitTorrent mailing list