aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-10 23:01:05 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-10 23:01:05 +0800
commit271fb20ecb48944692bdb4e7f91be9b90506981b (patch)
tree4acc7ee481a231bf2532b19f7f05f1f7b10c9bcc /cmd
parentb3d5ce7d48426bbe9269f3ea89029187cf939398 (diff)
downloaddexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar
dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.gz
dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.bz2
dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.lz
dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.xz
dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.zst
dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.zip
cmd/geth, eth/downloader: rough guess at the import eta
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/admin.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index ea8a70923..7bf23829a 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -325,8 +325,13 @@ func (js *jsre) setHead(call otto.FunctionCall) otto.Value {
}
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})
+ pending, cached, importing, eta := js.ethereum.Downloader().Stats()
+ v, _ := call.Otto.ToValue(map[string]interface{}{
+ "pending": pending,
+ "cached": cached,
+ "importing": importing,
+ "estimate": eta.String(),
+ })
return v
}