diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-10 23:01:05 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-06-10 23:01:05 +0800 |
commit | 271fb20ecb48944692bdb4e7f91be9b90506981b (patch) | |
tree | 4acc7ee481a231bf2532b19f7f05f1f7b10c9bcc /cmd | |
parent | b3d5ce7d48426bbe9269f3ea89029187cf939398 (diff) | |
download | dexon-271fb20ecb48944692bdb4e7f91be9b90506981b.tar.gz 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.go | 9 |
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 } |