diff options
Diffstat (limited to 'rpc/api/admin.go')
-rw-r--r-- | rpc/api/admin.go | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/rpc/api/admin.go b/rpc/api/admin.go index 6b89942b2..a6b9cf050 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -16,7 +16,7 @@ import ( ) const ( - AdminVersion = "1.0.0" + AdminApiversion = "1.0" importBatchSize = 2500 ) @@ -82,6 +82,10 @@ func (self *adminApi) Name() string { return AdminApiName } +func (self *adminApi) ApiVersion() string { + return AdminApiversion +} + func (self *adminApi) AddPeer(req *shared.Request) (interface{}, error) { args := new(AddPeerArgs) if err := self.codec.Decode(req.Params, &args); err != nil { @@ -215,8 +219,14 @@ func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) { } func (self *adminApi) ChainSyncStatus(req *shared.Request) (interface{}, error) { - pending, cached := self.ethereum.Downloader().Stats() - return map[string]interface{}{"blocksAvailable": pending, "blocksWaitingForImport": cached}, nil + pending, cached, importing, estimate := self.ethereum.Downloader().Stats() + + return map[string]interface{}{ + "blocksAvailable": pending, + "blocksWaitingForImport": cached, + "importing": importing, + "estimate": estimate.String(), + }, nil } func (self *adminApi) SetSolc(req *shared.Request) (interface{}, error) { |