forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
5eb9d52806
commit
9154e37e3a
|
@ -107,14 +107,6 @@ namespace libtorrent
|
|||
std::bitset<max_blocks_per_piece> finished_blocks;
|
||||
// info about each block
|
||||
block_info info[max_blocks_per_piece];
|
||||
|
||||
// TODO: If the hash test fails on the
|
||||
// piece, redownload one block from another peer
|
||||
// then the first time, and check the hash again.
|
||||
// also maintain a counter how many times a piece-hash
|
||||
// has been confirmed. Download blocks that hasn't
|
||||
// been confirmed (since they are most probably the
|
||||
// invalid blocks)
|
||||
};
|
||||
|
||||
piece_picker(int blocks_per_piece,
|
||||
|
@ -166,7 +158,7 @@ namespace libtorrent
|
|||
void mark_as_downloading(piece_block block, const address& peer);
|
||||
void mark_as_finished(piece_block block, const address& peer);
|
||||
|
||||
// if a piece had a hash-failure, it must be restured and
|
||||
// if a piece had a hash-failure, it must be restored and
|
||||
// made available for redownloading
|
||||
void restore_piece(int index);
|
||||
|
||||
|
@ -176,7 +168,7 @@ namespace libtorrent
|
|||
|
||||
bool is_piece_finished(int index) const;
|
||||
|
||||
// returns the number of blocks there is in the goven piece
|
||||
// returns the number of blocks there is in the given piece
|
||||
int blocks_in_piece(int index) const;
|
||||
|
||||
// the number of downloaded blocks that hasn't passed
|
||||
|
|
|
@ -295,7 +295,7 @@ namespace libtorrent
|
|||
assert(dst_vec[p.peer_count][p.index] == index);
|
||||
|
||||
// this will remove elem from the source vector without
|
||||
// preserving order
|
||||
// preserving order, but the order is random any way
|
||||
int replace_index = src_vec[peer_count][elem_index] = src_vec[peer_count].back();
|
||||
if (index != replace_index)
|
||||
{
|
||||
|
@ -458,7 +458,8 @@ namespace libtorrent
|
|||
{
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
num_blocks = add_interesting_blocks(*partial, pieces, interesting_pieces, num_blocks);
|
||||
num_blocks = add_interesting_blocks(*partial, pieces
|
||||
, interesting_pieces, num_blocks);
|
||||
if (num_blocks == 0) return;
|
||||
++partial;
|
||||
if (partial == m_downloading_piece_info.end()) break;
|
||||
|
|
Loading…
Reference in New Issue