aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-31 23:09:50 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-10-04 07:13:56 +0800
commit7c7692933c21b77328a94eed714f66c276776197 (patch)
treef7a394c1823dd4da1ed2b37709c1c8f52c51b6ef /cmd
parent361082ec4b942aea7c01fcb1be1782cb68b6fe3a (diff)
downloadgo-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 'cmd')
-rw-r--r--cmd/geth/blocktestcmd.go2
-rw-r--r--cmd/geth/js_test.go2
-rw-r--r--cmd/geth/main.go2
-rw-r--r--cmd/utils/cmd.go12
-rw-r--r--cmd/utils/flags.go4
5 files changed, 11 insertions, 11 deletions
diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go
index d6195e025..e0a5becdc 100644
--- a/cmd/geth/blocktestcmd.go
+++ b/cmd/geth/blocktestcmd.go
@@ -118,7 +118,7 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er
return ethereum, fmt.Errorf("InsertPreState: %v", err)
}
- cm := ethereum.ChainManager()
+ cm := ethereum.BlockChain()
validBlocks, err := test.TryBlocksInsert(cm)
if err != nil {
return ethereum, fmt.Errorf("Block Test load error: %v", err)
diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go
index 1f5b28e3a..2ad3d669c 100644
--- a/cmd/geth/js_test.go
+++ b/cmd/geth/js_test.go
@@ -196,7 +196,7 @@ func TestBlockChain(t *testing.T) {
tmpfile := filepath.Join(extmp, "export.chain")
tmpfileq := strconv.Quote(tmpfile)
- ethereum.ChainManager().Reset()
+ ethereum.BlockChain().Reset()
checkEvalJSON(t, repl, `admin.exportChain(`+tmpfileq+`)`, `true`)
if _, err := os.Stat(tmpfile); err != nil {
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index a9aa9f61f..e8292fdf2 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -48,7 +48,7 @@ import (
const (
ClientIdentifier = "Geth"
- Version = "1.2.0"
+ Version = "1.2.0-dev"
VersionMajor = 1
VersionMinor = 2
VersionPatch = 0
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index 983762db8..5e4bfc937 100644
--- a/cmd/utils/cmd.go
+++ b/cmd/utils/cmd.go
@@ -169,7 +169,7 @@ func FormatTransactionData(data string) []byte {
return d
}
-func ImportChain(chain *core.ChainManager, fn string) error {
+func ImportChain(chain *core.BlockChain, fn string) error {
// Watch for Ctrl-C while the import is running.
// If a signal is received, the import will stop at the next batch.
interrupt := make(chan os.Signal, 1)
@@ -244,7 +244,7 @@ func ImportChain(chain *core.ChainManager, fn string) error {
return 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
@@ -253,21 +253,21 @@ func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool {
return true
}
-func ExportChain(chainmgr *core.ChainManager, fn string) error {
+func ExportChain(blockchain *core.BlockChain, fn string) error {
glog.Infoln("Exporting blockchain to", fn)
fh, err := os.OpenFile(fn, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
if err != nil {
return err
}
defer fh.Close()
- if err := chainmgr.Export(fh); err != nil {
+ if err := blockchain.Export(fh); err != nil {
return err
}
glog.Infoln("Exported blockchain to", fn)
return nil
}
-func ExportAppendChain(chainmgr *core.ChainManager, fn string, first uint64, last uint64) error {
+func ExportAppendChain(blockchain *core.BlockChain, fn string, first uint64, last uint64) error {
glog.Infoln("Exporting blockchain to", fn)
// TODO verify mode perms
fh, err := os.OpenFile(fn, os.O_CREATE|os.O_APPEND|os.O_WRONLY, os.ModePerm)
@@ -275,7 +275,7 @@ func ExportAppendChain(chainmgr *core.ChainManager, fn string, first uint64, las
return err
}
defer fh.Close()
- if err := chainmgr.ExportN(fh, first, last); err != nil {
+ if err := blockchain.ExportN(fh, first, last); err != nil {
return err
}
glog.Infoln("Exported blockchain to", fn)
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index ad474f17d..dea43bc5c 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -508,7 +508,7 @@ func SetupEth(ctx *cli.Context) {
}
// MakeChain creates a chain manager from set command line flags.
-func MakeChain(ctx *cli.Context) (chain *core.ChainManager, chainDb ethdb.Database) {
+func MakeChain(ctx *cli.Context) (chain *core.BlockChain, chainDb ethdb.Database) {
datadir := MustDataDir(ctx)
cache := ctx.GlobalInt(CacheFlag.Name)
@@ -527,7 +527,7 @@ func MakeChain(ctx *cli.Context) (chain *core.ChainManager, chainDb ethdb.Databa
eventMux := new(event.TypeMux)
pow := ethash.New()
//genesis := core.GenesisBlock(uint64(ctx.GlobalInt(GenesisNonceFlag.Name)), blockDB)
- chain, err = core.NewChainManager(chainDb, pow, eventMux)
+ chain, err = core.NewBlockChain(chainDb, pow, eventMux)
if err != nil {
Fatalf("Could not start chainmanager: %v", err)
}