made the piece picker handle multi-request blocks better. fixes problem that might occur at the end of a torrent where the piece picker could take over blocks back and forth

This commit is contained in:
Arvid Norberg
2007-07-06 17:15:35 +00:00
parent b535b08033
commit a3e66a3efe
12 changed files with 112 additions and 202 deletions

View File

@@ -1737,7 +1737,7 @@ downloaded pieces down. Pieces set to ``none`` can be converted into any of ``fa
tcp::endpoint peer;
unsigned state:2;
unsigned num_downloads:14;
unsigned num_peers:14;
};
@@ -1750,7 +1750,9 @@ a state (``state``) which is any of:
* ``finished`` - The block has been written to disk.
The ``peer`` field is the ip address of the peer this block was downloaded from.
``num_downloads`` is the number of times this block has been downloaded.
``num_peers`` is the number of peers that is currently requesting this block. Typically this
is 0 or 1, but at the end of the torrent blocks may be requested by more peers in parallel to
speed things up.
get_peer_info()
---------------