forked from premiere/premiere-libtorrent
some more asserts
This commit is contained in:
parent
88cd663895
commit
da525292fe
|
@ -828,6 +828,8 @@ namespace libtorrent
|
|||
, end(m_piece_map.end()); i != end; ++i)
|
||||
{
|
||||
int prev_prio = i->priority(m_sequenced_download_threshold);
|
||||
assert(prev_prio < m_piece_info.size());
|
||||
assert(pushed_out_index < m_piece_info.size());
|
||||
assert(i->peer_count > 0);
|
||||
--i->peer_count;
|
||||
// if the assumption that the priority would
|
||||
|
|
|
@ -1140,6 +1140,7 @@ namespace detail
|
|||
|
||||
if (pi->optimistically_unchoked)
|
||||
{
|
||||
assert(!p->is_choked());
|
||||
assert(current_optimistic_unchoke == m_connections.end());
|
||||
current_optimistic_unchoke = i;
|
||||
}
|
||||
|
@ -2129,7 +2130,10 @@ namespace detail
|
|||
if (!i->second->is_choked()) ++unchokes;
|
||||
if (i->second->peer_info_struct()
|
||||
&& i->second->peer_info_struct()->optimistically_unchoked)
|
||||
{
|
||||
++num_optimistic;
|
||||
assert(!i->second->is_choked());
|
||||
}
|
||||
if (t)
|
||||
{
|
||||
assert(t->get_policy().has_connection(boost::get_pointer(i->second)));
|
||||
|
|
Loading…
Reference in New Issue