]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add piece length to torrent status
authorMatt Joiner <anacrolix@gmail.com>
Sat, 23 Aug 2014 17:11:35 +0000 (03:11 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 23 Aug 2014 17:11:35 +0000 (03:11 +1000)
torrent.go

index 8ddbe7b7d40e23c60377ea6939e9cbaf2d184e4e..792ce20f201f4dfe47c9ba56d86e7d264998118a 100644 (file)
@@ -222,6 +222,7 @@ func (t *torrent) NewMetadataExtensionMessage(c *connection, msgType int, piece
 
 func (t *torrent) WriteStatus(w io.Writer) {
        fmt.Fprintf(w, "Infohash: %x\n", t.InfoHash)
+       fmt.Fprintf(w, "Piece length: %d\n", t.UsualPieceSize())
        fmt.Fprint(w, "Pieces: ")
        for index := range t.Pieces {
                fmt.Fprintf(w, "%c", t.pieceStatusChar(index))