Merge pull request #1124 from karalabe/detaied-download-progress

cmd/geth: expand admin.progress() to something meaningful
pull/1132/head
Jeffrey Wilcke 9 years ago
commit 903b95fffa
  1. 4
      cmd/geth/admin.go

@ -262,8 +262,8 @@ func (js *jsre) setHead(call otto.FunctionCall) otto.Value {
}
func (js *jsre) downloadProgress(call otto.FunctionCall) otto.Value {
current, max := js.ethereum.Downloader().Stats()
v, _ := call.Otto.ToValue(fmt.Sprintf("%d/%d", current, max))
pending, cached := js.ethereum.Downloader().Stats()
v, _ := call.Otto.ToValue(map[string]interface{}{"pending": pending, "cached": cached})
return v
}

Loading…
Cancel
Save