aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-31 19:56:05 +0800
committerobscuren <geffobscura@gmail.com>2014-10-31 19:56:05 +0800
commitb1c247231b11f313ca0eedff75ea563926d23f68 (patch)
tree48b2136cb65e69cb79ffac80f3cc3fdf9dba1cc8 /peer.go
parentfd9da72536b73351bbcdc1e9dbbbb8c0e4bfb21b (diff)
downloadgo-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.gz
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.bz2
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.lz
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.xz
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.tar.zst
go-tangerine-b1c247231b11f313ca0eedff75ea563926d23f68.zip
ethlog => logger
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/peer.go b/peer.go
index ab25e5709..36db68023 100644
--- a/peer.go
+++ b/peer.go
@@ -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)
}