diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-05 04:06:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-05 04:06:50 +0800 |
commit | d651ff968a468abebcaf929964d4e9edd3d9ba97 (patch) | |
tree | d7cf97e0a28f47a135a61945ee9038c02d3796f1 | |
parent | f4af9e95c2b63ba261423cba0a9c05e37395123b (diff) | |
download | dexon-d651ff968a468abebcaf929964d4e9edd3d9ba97.tar.gz dexon-d651ff968a468abebcaf929964d4e9edd3d9ba97.tar.zst dexon-d651ff968a468abebcaf929964d4e9edd3d9ba97.zip |
Temp removed unrequested block error
@zelig look in to this please
-rw-r--r-- | blockpool/blockpool.go | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go index e65032fb5..3ae4e0620 100644 --- a/blockpool/blockpool.go +++ b/blockpool/blockpool.go @@ -653,15 +653,19 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) { } sender.lock.Unlock() - if entry == nil { - plog.DebugDetailf("AddBlock: unrequested block %s received from peer <%s> (head: %s)", hex(hash), peerId, hex(sender.currentBlockHash)) - sender.addError(ErrUnrequestedBlock, "%x", hash) - - self.status.lock.Lock() - self.status.badPeers[peerId]++ - self.status.lock.Unlock() - return - } + /* @zelig !!! + requested 5 hashes from both A & B. A responds sooner then B, process blocks. Close section. + delayed B sends you block ... UNREQUESTED. Blocked + if entry == nil { + plog.DebugDetailf("AddBlock: unrequested block %s received from peer <%s> (head: %s)", hex(hash), peerId, hex(sender.currentBlockHash)) + sender.addError(ErrUnrequestedBlock, "%x", hash) + + self.status.lock.Lock() + self.status.badPeers[peerId]++ + self.status.lock.Unlock() + return + } + */ } if entry == nil { return |