aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-13 23:02:37 +0800
committerobscuren <geffobscura@gmail.com>2015-02-13 23:02:37 +0800
commitbde3ff16ad98cb4ab0befc899f7f0584d21ff9a4 (patch)
tree7842c1a6ac8394e8bebfd4f27c9222b497aaf0f6 /eth
parent76fa75b39439e6c8c83ebc03fb32aa615227cc44 (diff)
downloaddexon-bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4.tar.gz
dexon-bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4.tar.zst
dexon-bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4.zip
merge
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go21
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(&ethlogger.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()