aboutsummaryrefslogtreecommitdiffstats
path: root/block_pool.go
diff options
context:
space:
mode:
Diffstat (limited to 'block_pool.go')
-rw-r--r--block_pool.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/block_pool.go b/block_pool.go
index 15d8ba3b9..ea1f3633a 100644
--- a/block_pool.go
+++ b/block_pool.go
@@ -86,7 +86,7 @@ func (self *BlockPool) Blocks() (blocks ethchain.Blocks) {
func (self *BlockPool) FetchHashes(peer *Peer) bool {
highestTd := self.eth.HighestTDPeer()
- if (self.peer == nil && peer.td.Cmp(highestTd) >= 0) || (self.peer != nil && peer.td.Cmp(self.peer.td) >= 0) || self.peer == peer {
+ if (self.peer == nil && peer.td.Cmp(highestTd) >= 0) || (self.peer != nil && peer.td.Cmp(self.peer.td) > 0) || self.peer == peer {
if self.peer != peer {
poollogger.Debugf("Found better suitable peer (%v vs %v)\n", self.td, peer.td)
@@ -102,7 +102,7 @@ func (self *BlockPool) FetchHashes(peer *Peer) bool {
peer.doneFetchingHashes = false
const amount = 256
- peerlogger.Debugf("Fetching hashes (%d)\n", amount)
+ peerlogger.Debugf("Fetching hashes (%d) %x...\n", amount, peer.lastReceivedHash[0:4])
peer.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{peer.lastReceivedHash, uint32(amount)}))
}