improve asserts in dht_storage

This commit is contained in:
arvidn 2016-06-10 00:55:17 -04:00
parent 9d3cf5e68b
commit f4a95131c5
2 changed files with 3 additions and 1 deletions

@ -1 +1 @@
Subproject commit f0e42435dce3ff227cc81b17ccab143b21d8f771 Subproject commit ea3bffe3c53bca5e0976914ea951193ba43fbed6

View File

@ -362,6 +362,7 @@ namespace
, char const* buf, int size , char const* buf, int size
, address const& addr) override , address const& addr) override
{ {
TORRENT_ASSERT(!m_node_ids.empty());
dht_immutable_table_t::iterator i = m_immutable_table.find(target); dht_immutable_table_t::iterator i = m_immutable_table.find(target);
if (i == m_immutable_table.end()) if (i == m_immutable_table.end())
{ {
@ -427,6 +428,7 @@ namespace
, char const* salt, int salt_size , char const* salt, int salt_size
, address const& addr) override , address const& addr) override
{ {
TORRENT_ASSERT(!m_node_ids.empty());
dht_mutable_table_t::iterator i = m_mutable_table.find(target); dht_mutable_table_t::iterator i = m_mutable_table.find(target);
if (i == m_mutable_table.end()) if (i == m_mutable_table.end())
{ {