Commit 3f91ee4f authored by Péter Szilágyi's avatar Péter Szilágyi

cmd/geth: expand admin.progress() to something meaningful

parent 8951a03d
...@@ -262,8 +262,8 @@ func (js *jsre) setHead(call otto.FunctionCall) otto.Value { ...@@ -262,8 +262,8 @@ func (js *jsre) setHead(call otto.FunctionCall) otto.Value {
} }
func (js *jsre) downloadProgress(call otto.FunctionCall) otto.Value { func (js *jsre) downloadProgress(call otto.FunctionCall) otto.Value {
current, max := js.ethereum.Downloader().Stats() pending, cached := js.ethereum.Downloader().Stats()
v, _ := call.Otto.ToValue(fmt.Sprintf("%d/%d", current, max)) v, _ := call.Otto.ToValue(map[string]interface{}{"pending": pending, "cached": cached})
return v return v
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment