diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-04 00:36:24 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-04 00:36:24 +0800 |
commit | 9de30d96f0362bc885d75a27bbd9c3d02af2d983 (patch) | |
tree | ececb77916fabbadff279fb2636ecd759afd9057 /ethereum | |
parent | a3c482351114404a4568f4b3f4503182402dc6fd (diff) | |
download | go-tangerine-9de30d96f0362bc885d75a27bbd9c3d02af2d983.tar.gz go-tangerine-9de30d96f0362bc885d75a27bbd9c3d02af2d983.tar.zst go-tangerine-9de30d96f0362bc885d75a27bbd9c3d02af2d983.zip |
Modify main wrappers
- clientIdentifier now set in main wrappers
- version handled within wrapper
- modify InitConfig now returning *ethutil.ConfigManager (passed to gui)
- added NewClientIdentity returning *ethwire.SimpleClientIdentiy (passed to ethereum)
Diffstat (limited to 'ethereum')
-rw-r--r-- | ethereum/main.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ethereum/main.go b/ethereum/main.go index 1531871cb..e4d73d494 100644 --- a/ethereum/main.go +++ b/ethereum/main.go @@ -6,6 +6,11 @@ import ( "runtime" ) +const ( + ClientIdentifier = "Ethereum(G)" + Version = "0.5.16" +) + var logger = ethlog.NewLogger("CLI") func main() { @@ -15,7 +20,7 @@ func main() { // precedence: code-internal flag default < config file < environment variables < command line Init() // parsing command line - utils.InitConfig(ConfigFile, Datadir, Identifier, "ETH") + utils.InitConfig(ConfigFile, Datadir, "ETH") utils.InitDataDir(Datadir) @@ -28,7 +33,9 @@ func main() { // create, import, export keys utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - ethereum := utils.NewEthereum(db, keyManager, UseUPnP, OutboundPort, MaxPeer) + clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier) + + ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer) if ShowGenesis { utils.ShowGenesis(ethereum) |