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