log hash of data on incoming pieces

This commit is contained in:
Arvid Norberg 2012-03-26 15:24:14 +00:00
parent 8549840d5a
commit 289921e276
1 changed files with 5 additions and 2 deletions

View File

@ -2379,9 +2379,12 @@ namespace libtorrent
#endif
#ifdef TORRENT_VERBOSE_LOGGING
peer_log("<== PIECE [ piece: %d | s: %d | l: %d | ds: %d | qs: %d | q: %d ]"
hasher h;
h.update(data.get(), p.length);
peer_log("<== PIECE [ piece: %d | s: %d | l: %d | ds: %d | qs: %d | q: %d | hash: %s ]"
, p.piece, p.start, p.length, statistics().download_rate()
, int(m_desired_queue_size), int(m_download_queue.size()));
, int(m_desired_queue_size), int(m_download_queue.size())
, to_hex(h.final().to_string()).c_str());
#endif
if (p.length == 0)