the forums at degreez.net

It is currently Tue Apr 23, 2024 3:14 pm

All times are UTC - 7 hours [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Thu Feb 10, 2005 4:15 pm 
Offline

Joined: Thu Feb 10, 2005 2:43 pm
Posts: 3
Greetings,

I'm porting the BT to VB.NET so I'm examining the BT 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...

Code:
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 so far 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 cansee in the 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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 66 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group