diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-10 06:20:35 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-06-10 06:20:35 +0800 |
commit | b3d5ce7d48426bbe9269f3ea89029187cf939398 (patch) | |
tree | cc01bd95826bfc833a68951cb1447198612a5940 /cmd | |
parent | e972a116acb8755d9d70ad271cae2918869dcc3b (diff) | |
download | go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.tar go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.tar.gz go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.tar.bz2 go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.tar.lz go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.tar.xz go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.tar.zst go-tangerine-b3d5ce7d48426bbe9269f3ea89029187cf939398.zip |
cmd/geth, eth/downloader: collect and report import progress too
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/geth/admin.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index 13d10de32..ea8a70923 100644 --- a/cmd/geth/admin.go +++ b/cmd/geth/admin.go @@ -51,7 +51,7 @@ func (js *jsre) adminBindings() { admin.Set("import", js.importChain) admin.Set("export", js.exportChain) admin.Set("verbosity", js.verbosity) - admin.Set("progress", js.downloadProgress) + admin.Set("progress", js.syncProgress) admin.Set("setSolc", js.setSolc) admin.Set("contractInfo", struct{}{}) @@ -324,9 +324,9 @@ func (js *jsre) setHead(call otto.FunctionCall) otto.Value { return otto.UndefinedValue() } -func (js *jsre) downloadProgress(call otto.FunctionCall) otto.Value { - pending, cached := js.ethereum.Downloader().Stats() - v, _ := call.Otto.ToValue(map[string]interface{}{"pending": pending, "cached": cached}) +func (js *jsre) syncProgress(call otto.FunctionCall) otto.Value { + pending, cached, importing := js.ethereum.Downloader().Stats() + v, _ := call.Otto.ToValue(map[string]interface{}{"pending": pending, "cached": cached, "importing": importing}) return v } |