- do not break from headsection on error
[remove peer after protocol quit will close switchC, until then head block can arrive and block on channel while keeping peers lock causing a deadlock.]
- more careful locking in AddBlock
// there is no persistence here, so GC will just take care of cleaning up
breakLOOP
// signal for peer switch, quit
case<-switchC:
@ -594,7 +587,6 @@ LOOP:
self.bp.status.badPeers[self.id]++
self.bp.status.lock.Unlock()
plog.Debugf("HeadSection: <%s> (headsection [%s]) quit channel closed : timed out without providing new blocks...quitting",self.id,sectionhex(self.headSection))