aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api/admin.go8
-rw-r--r--rpc/api/debug.go2
-rw-r--r--rpc/api/eth.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/rpc/api/admin.go b/rpc/api/admin.go
index 8af69b189..6aa04e667 100644
--- a/rpc/api/admin.go
+++ b/rpc/api/admin.go
@@ -151,7 +151,7 @@ func (self *adminApi) DataDir(req *shared.Request) (interface{}, error) {
return self.ethereum.DataDir, nil
}
-func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool {
+func hasAllBlocks(chain *core.BlockChain, bs []*types.Block) bool {
for _, b := range bs {
if !chain.HasBlock(b.Hash()) {
return false
@@ -193,10 +193,10 @@ func (self *adminApi) ImportChain(req *shared.Request) (interface{}, error) {
break
}
// Import the batch.
- if hasAllBlocks(self.ethereum.ChainManager(), blocks[:i]) {
+ if hasAllBlocks(self.ethereum.BlockChain(), blocks[:i]) {
continue
}
- if _, err := self.ethereum.ChainManager().InsertChain(blocks[:i]); err != nil {
+ if _, err := self.ethereum.BlockChain().InsertChain(blocks[:i]); err != nil {
return false, fmt.Errorf("invalid block %d: %v", n, err)
}
}
@@ -214,7 +214,7 @@ func (self *adminApi) ExportChain(req *shared.Request) (interface{}, error) {
return false, err
}
defer fh.Close()
- if err := self.ethereum.ChainManager().Export(fh); err != nil {
+ if err := self.ethereum.BlockChain().Export(fh); err != nil {
return false, err
}
diff --git a/rpc/api/debug.go b/rpc/api/debug.go
index d325b1720..e193f7ad2 100644
--- a/rpc/api/debug.go
+++ b/rpc/api/debug.go
@@ -152,7 +152,7 @@ func (self *debugApi) SetHead(req *shared.Request) (interface{}, error) {
return nil, fmt.Errorf("block #%d not found", args.BlockNumber)
}
- self.ethereum.ChainManager().SetHead(block)
+ self.ethereum.BlockChain().SetHead(block)
return nil, nil
}
diff --git a/rpc/api/eth.go b/rpc/api/eth.go
index 4cd5f2695..6db006a46 100644
--- a/rpc/api/eth.go
+++ b/rpc/api/eth.go
@@ -168,7 +168,7 @@ func (self *ethApi) IsMining(req *shared.Request) (interface{}, error) {
}
func (self *ethApi) IsSyncing(req *shared.Request) (interface{}, error) {
- current := self.ethereum.ChainManager().CurrentBlock().NumberU64()
+ current := self.ethereum.BlockChain().CurrentBlock().NumberU64()
origin, height := self.ethereum.Downloader().Boundaries()
if current < height {