diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-04 21:39:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-04 21:39:15 +0800 |
commit | 987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9 (patch) | |
tree | 32ff13edca8c3d9b61b303f7d314291d0f216574 /cmd/ethereum/main.go | |
parent | 1b905675465d96227f1a8144fe592e76f646f559 (diff) | |
parent | 08b03afa4bb3a40d2faf6543bc884a8ece5be2a1 (diff) | |
download | go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.gz go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.bz2 go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.lz go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.xz go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.tar.zst go-tangerine-987119cd4adcdbc7ebfd0bbb027a0c9e2a7487e9.zip |
Merge branch 'poc8' into docbranch
Diffstat (limited to 'cmd/ethereum/main.go')
-rw-r--r-- | cmd/ethereum/main.go | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 7efee31e7..b23852282 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -25,13 +25,14 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" ) const ( ClientIdentifier = "Ethereum(G)" - Version = "0.7.11" + Version = "0.8.0" ) var clilogger = logger.NewLogger("CLI") @@ -48,35 +49,26 @@ func main() { // precedence: code-internal flag default < config file < environment variables < command line Init() // parsing command line - // If the difftool option is selected ignore all other log output - if DiffTool || Dump { - LogLevel = 0 - } - utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") - ethutil.Config.Diff = DiffTool - ethutil.Config.DiffType = DiffType - - utils.InitDataDir(Datadir) - utils.InitLogging(Datadir, LogFile, LogLevel, DebugFile) - - db := utils.NewDatabase() - err := utils.DBSanityCheck(db) + ethereum, err := eth.New(ð.Config{ + Name: ClientIdentifier, + Version: Version, + KeyStore: KeyStore, + DataDir: Datadir, + LogFile: LogFile, + LogLevel: LogLevel, + Identifier: Identifier, + MaxPeers: MaxPeer, + Port: OutboundPort, + NATType: PMPGateway, + PMPGateway: PMPGateway, + KeyRing: KeyRing, + }) if err != nil { - fmt.Println(err) - - os.Exit(1) + clilogger.Fatalln(err) } - - keyManager := utils.NewKeyManager(KeyStore, Datadir, db) - - // create, import, export keys - utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier, string(keyManager.PublicKey())) - - ethereum := utils.NewEthereum(db, clientIdentity, keyManager, utils.NatType(NatType, PMPGateway), OutboundPort, MaxPeer) + utils.KeyTasks(ethereum.KeyManager(), KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) if Dump { var block *types.Block @@ -103,11 +95,7 @@ func main() { fmt.Println(block) - os.Exit(0) - } - - if ShowGenesis { - utils.ShowGenesis(ethereum) + return } if StartMining { |