diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-08 17:59:44 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-08 17:59:44 +0800 |
commit | b417766b36f46316cbae6fa42815f1a519e5f733 (patch) | |
tree | aba26c0aefdcda3c3cd4b3583b84a2b2ebcf1efd /block_pool.go | |
parent | 0015ce1e353f52cca818d11f566b9a656fb85f24 (diff) | |
download | dexon-b417766b36f46316cbae6fa42815f1a519e5f733.tar.gz dexon-b417766b36f46316cbae6fa42815f1a519e5f733.tar.zst dexon-b417766b36f46316cbae6fa42815f1a519e5f733.zip |
Minor tweaks for poc7
Diffstat (limited to 'block_pool.go')
-rw-r--r-- | block_pool.go | 4 |
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)})) } |