upgrade web3.js with _extend support

This commit is contained in:
Bas van Kervel
2015-06-10 09:42:14 +02:00
committed by Bas van Kervel
parent 1fe617fa57
commit 7584e68c21
7 changed files with 51 additions and 6 deletions

View File

@ -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) {