diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-31 19:56:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-31 19:56:05 +0800 |
commit | b1c247231b11f313ca0eedff75ea563926d23f68 (patch) | |
tree | 48b2136cb65e69cb79ffac80f3cc3fdf9dba1cc8 /peer.go | |
parent | fd9da72536b73351bbcdc1e9dbbbb8c0e4bfb21b (diff) | |
download | go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.gz go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.zst go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.zip |
ethlog => logger
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -13,12 +13,12 @@ import ( "time" "github.com/ethereum/go-ethereum/chain" - "github.com/ethereum/go-ethereum/ethlog" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/ethwire" + "github.com/ethereum/go-ethereum/logger" ) -var peerlogger = ethlog.NewLogger("PEER") +var peerlogger = logger.NewLogger("PEER") const ( // The size of the output buffer for writing messages @@ -696,18 +696,18 @@ func (self *Peer) handleStatus(msg *ethwire.Msg) { ) if bytes.Compare(self.ethereum.ChainManager().Genesis().Hash(), genesis) != 0 { - ethlogger.Warnf("Invalid genisis hash %x. Disabling [eth]\n", genesis) + loggerger.Warnf("Invalid genisis hash %x. Disabling [eth]\n", genesis) return } if netVersion != NetVersion { - ethlogger.Warnf("Invalid network version %d. Disabling [eth]\n", netVersion) + loggerger.Warnf("Invalid network version %d. Disabling [eth]\n", netVersion) return } /* if protoVersion != ProtocolVersion { - ethlogger.Warnf("Invalid protocol version %d. Disabling [eth]\n", protoVersion) + loggerger.Warnf("Invalid protocol version %d. Disabling [eth]\n", protoVersion) return } */ @@ -723,7 +723,7 @@ func (self *Peer) handleStatus(msg *ethwire.Msg) { // fetch hashes from highest TD node. self.FetchHashes() - ethlogger.Infof("Peer is [eth] capable. (TD = %v ~ %x)", self.td, self.bestHash) + loggerger.Infof("Peer is [eth] capable. (TD = %v ~ %x)", self.td, self.bestHash) } @@ -819,7 +819,7 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) { switch cap { case "eth": if ver != ProtocolVersion { - ethlogger.Warnf("Invalid protocol version %d. Disabling [eth]\n", ver) + loggerger.Warnf("Invalid protocol version %d. Disabling [eth]\n", ver) continue } p.pushStatus() @@ -828,7 +828,7 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) { capsStrs = append(capsStrs, cap) } - ethlogger.Infof("Added peer (%s) %d / %d (%v)\n", p.conn.RemoteAddr(), p.ethereum.Peers().Len(), p.ethereum.MaxPeers, capsStrs) + peerlogger.Infof("Added peer (%s) %d / %d (%v)\n", p.conn.RemoteAddr(), p.ethereum.Peers().Len(), p.ethereum.MaxPeers, capsStrs) peerlogger.Debugln(p) } |