aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-19 19:31:37 +0800
committerobscuren <geffobscura@gmail.com>2015-04-19 19:31:37 +0800
commit3d497be9bdbb6b97c302d1c8b505ee265d677138 (patch)
treefd1e0974ff5be8230cd95ddf1dbd71230e1e5584 /eth/peer.go
parent6e1aa91aaf0d3af7151a891fb1cc6f7aa0c6ab4c (diff)
downloadgo-tangerine-3d497be9bdbb6b97c302d1c8b505ee265d677138.tar.gz
go-tangerine-3d497be9bdbb6b97c302d1c8b505ee265d677138.tar.zst
go-tangerine-3d497be9bdbb6b97c302d1c8b505ee265d677138.zip
eth: drop blocks with low TD
Diffstat (limited to 'eth/peer.go')
-rw-r--r--eth/peer.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/eth/peer.go b/eth/peer.go
index 8cedbd85a..972880845 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -6,6 +6,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/logger"
+ "github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/p2p"
"gopkg.in/fatih/set.v0"
)
@@ -85,12 +87,12 @@ func (p *peer) sendNewBlock(block *types.Block) error {
}
func (p *peer) requestHashes(from common.Hash) error {
- p.Debugf("fetching hashes (%d) %x...\n", maxHashes, from[0:4])
+ glog.V(logger.Debug).Infof("[%s] fetching hashes (%d) %x...\n", p.id, maxHashes, from[:4])
return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesMsgData{from, maxHashes})
}
func (p *peer) requestBlocks(hashes []common.Hash) error {
- p.Debugf("fetching %v blocks", len(hashes))
+ glog.V(logger.Debug).Infof("[%s] fetching %v blocks\n", p.id, len(hashes))
return p2p.Send(p.rw, GetBlocksMsg, hashes)
}