From 1643b8da6bfb211568f183c1ac739e93b7a1b238 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sun, 23 Aug 2015 23:41:34 +0200 Subject: cmd: remove verbose block data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a lot harder to visualize with the new torrent-piece backend, since we don’t keep an explicit array of which blocks are reserved. Just remove it for now. If we need this visualization back to debug something, it should be possible to recreate it from torrent-piece with a bit of work. --- bin/cmd.js | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'bin') diff --git a/bin/cmd.js b/bin/cmd.js index 5536425..816d94e 100755 --- a/bin/cmd.js +++ b/bin/cmd.js @@ -538,32 +538,6 @@ function drawTorrent (torrent) { clivas.line('{80:}') linesRemaining -= 5 - if (argv.verbose) { - var pieces = torrent.pieces - for (var i = 0; i < pieces.length; i++) { - var piece = pieces[i] - if (piece.verified || (piece.blocksWritten === 0 && !piece.blocks[0])) continue - var bar = '' - for (var j = 0; j < piece.blocks.length; j++) { - // switch (piece.blocks[j]) { - // case Storage.BLOCK_BLANK: - // bar += '{red:█}' - // break - // case Storage.BLOCK_RESERVED: - // bar += '{blue:█}' - // break - // case Storage.BLOCK_WRITTEN: - // bar += '{green:█}' - // break - // } - } - clivas.line('{4+cyan:' + i + '} ' + bar) - linesRemaining -= 1 - } - clivas.line('{80:}') - linesRemaining -= 1 - } - torrent.swarm.wires.every(function (wire) { var progress = '?' if (torrent.length) { -- cgit v1.2.3