Show piece counts for peers in status page
Lets me visually check that connections agree on number of pieces.
This commit is contained in:
parent
99bec9ac58
commit
65e1bbb6ba
|
@ -54,8 +54,9 @@ func (cn *connection) completedString() string {
|
||||||
if cn.PeerPieces == nil {
|
if cn.PeerPieces == nil {
|
||||||
return "?"
|
return "?"
|
||||||
}
|
}
|
||||||
f := float32(cn.piecesPeerHasCount()) / float32(cn.totalPiecesCount())
|
// f := float32(cn.piecesPeerHasCount()) / float32(cn.totalPiecesCount())
|
||||||
return fmt.Sprintf("%d%%", int(f*100))
|
// return fmt.Sprintf("%d%%", int(f*100))
|
||||||
|
return fmt.Sprintf("%d/%d", cn.piecesPeerHasCount(), cn.totalPiecesCount())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cn *connection) totalPiecesCount() int {
|
func (cn *connection) totalPiecesCount() int {
|
||||||
|
|
Loading…
Reference in New Issue