From 289921e276879415020109d38b31b58949d88e33 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 26 Mar 2012 15:24:14 +0000 Subject: [PATCH] log hash of data on incoming pieces --- src/peer_connection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 2151fc157..92bfb1bb3 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -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)