diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-02 06:03:19 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-02 06:03:19 +0800 |
commit | 5fa0173c4147baee54ad1846a23cd4410c50420b (patch) | |
tree | 3135651468b628cd08f3ac635355080c72ba96b8 /block_pool.go | |
parent | 3af211dd65d6690afce9976a9f47ab1cdddb8d58 (diff) | |
download | dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.tar dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.tar.gz dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.tar.bz2 dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.tar.lz dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.tar.xz dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.tar.zst dexon-5fa0173c4147baee54ad1846a23cd4410c50420b.zip |
msg
Diffstat (limited to 'block_pool.go')
-rw-r--r-- | block_pool.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block_pool.go b/block_pool.go index 003d1db58..2dbe11069 100644 --- a/block_pool.go +++ b/block_pool.go @@ -97,9 +97,9 @@ func (self *BlockPool) Add(b *ethchain.Block, peer *Peer) { self.hashPool = append(self.hashPool, b.Hash()) self.pool[hash] = &block{peer, peer, b, time.Now(), 0} - if !self.eth.BlockChain().HasBlock(b.PrevHash) && !self.fetchingHashes { - //poollogger.Infof("Unknown block, requesting parent (%x...)\n", b.PrevHash[0:4]) - //peer.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{b.PrevHash, uint32(256)})) + if !self.eth.BlockChain().HasBlock(b.PrevHash) && self.pool[string(b.PrevHash)] == nil && !self.fetchingHashes { + poollogger.Infof("Unknown block, requesting parent (%x...)\n", b.PrevHash[0:4]) + //peer.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{b.Hash(), uint32(256)})) } } else if self.pool[hash] != nil { self.pool[hash].block = b |