prevent deadlock

This commit is contained in:
obscuren
2015-04-04 18:23:51 +02:00
parent f9488cb763
commit 7a18a39351
3 changed files with 12 additions and 17 deletions

View File

@@ -622,6 +622,8 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) {
entry := self.get(hash)
fmt.Println("block number", block.Number())
defer fmt.Println("AddBlock done")
// a peer's current head block is appearing the first time
if hash == sender.currentBlockHash {
if sender.currentBlock == nil {