aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-04-01 21:54:29 +0800
committerMaran <maran.hidskes@gmail.com>2014-04-01 21:54:29 +0800
commit782910eaa76bb31be4c2bcd0f4505b8085acb57c (patch)
tree79dfa501fc8224919734a66d842b185027612401 /peer.go
parent3558dd5ed4e14f124f04e2bf72fc3b989dff9e77 (diff)
downloadgo-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.tar
go-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.tar.gz
go-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.tar.bz2
go-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.tar.lz
go-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.tar.xz
go-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.tar.zst
go-tangerine-782910eaa76bb31be4c2bcd0f4505b8085acb57c.zip
Small tweaks
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/peer.go b/peer.go
index f2267c29b..0ecd13e60 100644
--- a/peer.go
+++ b/peer.go
@@ -337,16 +337,16 @@ func (p *Peer) HandleInbound() {
block = ethchain.NewBlockFromRlpValue(msg.Data.Get(i))
// Do we have this block on our chain? If so we can continue
if p.ethereum.StateManager().BlockChain().HasBlock(block.Hash()) {
- fmt.Println("[PEER] Block found, checking next one.")
+ ethutil.Config.Log.Debugf("[PEER] Block found, checking next one.\n")
} else {
// We don't have this block, but we do have a block with the same prevHash, diversion time!
if p.ethereum.StateManager().BlockChain().HasBlockWithPrevHash(block.PrevHash) {
- fmt.Printf("[PEER] Local and foreign chain have diverted after %x, we are going to get freaky with it!\n", block.PrevHash)
+ ethutil.Config.Log.Infof("[PEER] Local and foreign chain have diverted after %x, finding best chain!\n", block.PrevHash)
if p.ethereum.StateManager().BlockChain().FindCanonicalChainFromMsg(msg, block.PrevHash) {
return
}
} else {
- fmt.Println("[PEER] Both local and foreign chain have same parent. Continue normally")
+ ethutil.Config.Log.Debugf("[PEER] Both local and foreign chain have same parent. Continue normally\n")
}
}
}
@@ -362,7 +362,6 @@ func (p *Peer) HandleInbound() {
if ethutil.Config.Debug {
ethutil.Config.Log.Infof("[PEER] Block %x failed\n", block.Hash())
ethutil.Config.Log.Infof("[PEER] %v\n", err)
- ethutil.Config.Log.Infoln(block)
}
break
} else {
@@ -637,8 +636,6 @@ func (p *Peer) SyncWithBlocks() {
if p.blocksRequested == 0 {
p.blocksRequested = 10
}
- fmt.Printf("Currenb lock %x\n", p.ethereum.BlockChain().CurrentBlock.Hash())
- fmt.Println("Amount:", p.blocksRequested)
blocks := p.ethereum.BlockChain().GetChain(p.ethereum.BlockChain().CurrentBlock.Hash(), p.blocksRequested)
var hashes []interface{}