diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-13 23:02:37 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-13 23:02:37 +0800 |
commit | bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4 (patch) | |
tree | 7842c1a6ac8394e8bebfd4f27c9222b497aaf0f6 /eth | |
parent | 76fa75b39439e6c8c83ebc03fb32aa615227cc44 (diff) | |
download | dexon-bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4.tar.gz dexon-bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4.tar.zst dexon-bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4.zip |
merge
Diffstat (limited to 'eth')
-rw-r--r-- | eth/backend.go | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/eth/backend.go b/eth/backend.go index 684f15136..28a065066 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -20,14 +20,16 @@ import ( ) var logger = ethlogger.NewLogger("SERV") +var jsonlogger = ethlogger.NewJsonLogger() type Config struct { - Name string - KeyStore string - DataDir string - LogFile string - LogLevel int - KeyRing string + Name string + KeyStore string + DataDir string + LogFile string + LogLevel int + KeyRing string + LogFormat string MaxPeers int Port string @@ -47,9 +49,6 @@ type Config struct { KeyManager *crypto.KeyManager } -var logger = ethlogger.NewLogger("SERV") -var jsonlogger = ethlogger.NewJsonLogger() - func (cfg *Config) parseBootNodes() []*discover.Node { var ns []*discover.Node for _, url := range strings.Split(cfg.BootNodes, " ") { @@ -240,10 +239,10 @@ func (s *Ethereum) Coinbase() []byte { // Start the ethereum func (s *Ethereum) Start() error { jsonlogger.LogJson(ðlogger.LogStarting{ - ClientString: s.ClientIdentity().String(), + ClientString: s.net.Name, Coinbase: ethutil.Bytes2Hex(s.KeyManager().Address()), ProtocolVersion: ProtocolVersion, - LogEvent: ethlogger.LogEvent{Guid: ethutil.Bytes2Hex(s.ClientIdentity().Pubkey())}, + LogEvent: ethlogger.LogEvent{Guid: ethutil.Bytes2Hex(crypto.FromECDSAPub(&s.net.PrivateKey.PublicKey))}, }) err := s.net.Start() |