Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-08-24 00:41:34 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-08-24 00:41:34 +0300
commit1643b8da6bfb211568f183c1ac739e93b7a1b238 (patch)
tree0bd510d585948b05de8d42f4dadd8bb5c94bce27
parentadc1c80c4bde9fbeb3103a60615e251ada1f6934 (diff)
cmd: remove verbose block data
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.
-rwxr-xr-xbin/cmd.js26
1 files changed, 0 insertions, 26 deletions
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) {