aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
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/geth
parentb3d5ce7d48426bbe9269f3ea89029187cf939398 (diff)
downloadgo-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.tar
go-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.gz
go-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.bz2
go-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.lz
go-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.xz
go-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.zst
go-tangerine-271fb20ecb48944692bdb4e7f91be9b90506981b.zip
cmd/geth, eth/downloader: rough guess at the import eta
Diffstat (limited to 'cmd/geth')
-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
}