diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-20 07:10:39 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-20 07:10:39 +0800 |
commit | 0251fae5ccf6984c558d59cd2b36ef89116c061e (patch) | |
tree | 01dd9494eaf7171fb9e65ab6309820358ed08968 /peer.go | |
parent | 0c6b41f4c9edf33cf36b5e044b62e29161d50b07 (diff) | |
download | go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.tar go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.tar.gz go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.tar.bz2 go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.tar.lz go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.tar.xz go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.tar.zst go-tangerine-0251fae5ccf6984c558d59cd2b36ef89116c061e.zip |
Changed loggers
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -419,7 +419,7 @@ func (p *Peer) HandleInbound() { if p.catchingUp && msg.Data.Len() > 1 { if lastBlock != nil { blockInfo := lastBlock.BlockInfo() - ethutil.Config.Log.Debugf("Synced chain to #%d %x %x\n", blockInfo.Number, lastBlock.Hash(), blockInfo.Hash) + ethutil.Config.Log.Printf(ethutil.LogLevelSystem, "Synced chain to #%d %x %x\n", blockInfo.Number, lastBlock.Hash(), blockInfo.Hash) } p.catchingUp = false @@ -486,7 +486,7 @@ func (p *Peer) HandleInbound() { // If a parent is found send back a reply if parent != nil { - ethutil.Config.Log.Debugf("[PEER] Found canonical block, returning chain from: %x ", parent.Hash()) + ethutil.Config.Log.Printf(ethutil.LogLevelSystem, "[PEER] Found canonical block, returning chain from: %x ", parent.Hash()) chain := p.ethereum.BlockChain().GetChainFromHash(parent.Hash(), amountOfBlocks) if len(chain) > 0 { //ethutil.Config.Log.Debugf("[PEER] Returning %d blocks: %x ", len(chain), parent.Hash()) @@ -506,7 +506,7 @@ func (p *Peer) HandleInbound() { } } case ethwire.MsgNotInChainTy: - ethutil.Config.Log.Debugf("Not in chain: %x\n", msg.Data.Get(0).Bytes()) + ethutil.Config.Log.Printf(ethutil.LogLevelSystem, "Not in chain: %x\n", msg.Data.Get(0).Bytes()) if p.diverted == true { // If were already looking for a common parent and we get here again we need to go deeper p.blocksRequested = p.blocksRequested * 2 @@ -727,7 +727,7 @@ func (p *Peer) FindCommonParentBlock() { msgInfo := append(hashes, uint64(len(hashes))) - ethutil.Config.Log.Infof("Asking for block from %x (%d total) from %s\n", p.ethereum.BlockChain().CurrentBlock.Hash(), len(hashes), p.conn.RemoteAddr().String()) + ethutil.Config.Log.Printf(ethutil.LogLevelSystem, "Asking for block from %x (%d total) from %s\n", p.ethereum.BlockChain().CurrentBlock.Hash(), len(hashes), p.conn.RemoteAddr().String()) msg := ethwire.NewMessage(ethwire.MsgGetChainTy, msgInfo) p.QueueMessage(msg) @@ -739,7 +739,7 @@ func (p *Peer) CatchupWithPeer(blockHash []byte) { msg := ethwire.NewMessage(ethwire.MsgGetChainTy, []interface{}{blockHash, uint64(50)}) p.QueueMessage(msg) - ethutil.Config.Log.Debugf("Requesting blockchain %x... from peer %s\n", p.ethereum.BlockChain().CurrentBlock.Hash()[:4], p.conn.RemoteAddr()) + ethutil.Config.Log.Printf(ethutil.LogLevelSystem, "Requesting blockchain %x... from peer %s\n", p.ethereum.BlockChain().CurrentBlock.Hash()[:4], p.conn.RemoteAddr()) msg = ethwire.NewMessage(ethwire.MsgGetTxsTy, []interface{}{}) p.QueueMessage(msg) |