eth, rpc: standardize the chain sync progress counters
This commit is contained in:
@ -55,7 +55,6 @@ var (
|
||||
"admin_exportChain": (*adminApi).ExportChain,
|
||||
"admin_importChain": (*adminApi).ImportChain,
|
||||
"admin_verbosity": (*adminApi).Verbosity,
|
||||
"admin_chainSyncStatus": (*adminApi).ChainSyncStatus,
|
||||
"admin_setSolc": (*adminApi).SetSolc,
|
||||
"admin_datadir": (*adminApi).DataDir,
|
||||
"admin_startRPC": (*adminApi).StartRPC,
|
||||
@ -232,17 +231,6 @@ func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (self *adminApi) ChainSyncStatus(req *shared.Request) (interface{}, error) {
|
||||
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) {
|
||||
args := new(SetSolcArgs)
|
||||
if err := self.coder.Decode(req.Params, &args); err != nil {
|
||||
|
Reference in New Issue
Block a user