diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-31 23:09:50 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-10-04 07:13:56 +0800 |
commit | 7c7692933c21b77328a94eed714f66c276776197 (patch) | |
tree | f7a394c1823dd4da1ed2b37709c1c8f52c51b6ef /rpc/api/admin.go | |
parent | 361082ec4b942aea7c01fcb1be1782cb68b6fe3a (diff) | |
download | go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.gz go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.bz2 go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.lz go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.xz go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.zst go-tangerine-7c7692933c21b77328a94eed714f66c276776197.zip |
cmd/geth, cmd/utils, core, rpc: renamed to blockchain
* Renamed ChainManager to BlockChain
* Checkpointing is no longer required and never really properly worked
when the state was corrupted.
Diffstat (limited to 'rpc/api/admin.go')
-rw-r--r-- | rpc/api/admin.go | 8 |
1 files changed, 4 insertions, 4 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 } |