forked from cerc-io/plugeth
Temp removed unrequested block error
@zelig look in to this please
This commit is contained in:
parent
f4af9e95c2
commit
d651ff968a
@ -653,15 +653,19 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) {
|
|||||||
}
|
}
|
||||||
sender.lock.Unlock()
|
sender.lock.Unlock()
|
||||||
|
|
||||||
if entry == nil {
|
/* @zelig !!!
|
||||||
plog.DebugDetailf("AddBlock: unrequested block %s received from peer <%s> (head: %s)", hex(hash), peerId, hex(sender.currentBlockHash))
|
requested 5 hashes from both A & B. A responds sooner then B, process blocks. Close section.
|
||||||
sender.addError(ErrUnrequestedBlock, "%x", hash)
|
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.lock.Lock()
|
||||||
self.status.badPeers[peerId]++
|
self.status.badPeers[peerId]++
|
||||||
self.status.lock.Unlock()
|
self.status.lock.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
if entry == nil {
|
if entry == nil {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user