aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/admin.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-06-10 15:42:14 +0800
committerBas van Kervel <basvankervel@gmail.com>2015-06-11 20:43:05 +0800
commit7584e68c21cfd155a9e72b29422d8d458691d4ae (patch)
treef552bef4bb93ae8a0199a84fe1cb20a6ffb12b4b /rpc/api/admin.go
parent1fe617fa5791bffb6b3cc60636c6629c7aca36d3 (diff)
downloadgo-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.tar
go-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.tar.gz
go-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.tar.bz2
go-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.tar.lz
go-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.tar.xz
go-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.tar.zst
go-tangerine-7584e68c21cfd155a9e72b29422d8d458691d4ae.zip
upgrade web3.js with _extend support
Diffstat (limited to 'rpc/api/admin.go')
-rw-r--r--rpc/api/admin.go16
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) {