mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
Merge pull request #1865 from obscuren/deadlock-chainmanager-fix
core: deadlock in chainmanager after posting RemovedTransactionEvent
This commit is contained in:
commit
0d78f96205
1 changed files with 3 additions and 1 deletions
|
|
@ -804,7 +804,9 @@ func (self *ChainManager) reorg(oldBlock, newBlock *types.Block) error {
|
||||||
DeleteReceipt(self.chainDb, tx.Hash())
|
DeleteReceipt(self.chainDb, tx.Hash())
|
||||||
DeleteTransaction(self.chainDb, tx.Hash())
|
DeleteTransaction(self.chainDb, tx.Hash())
|
||||||
}
|
}
|
||||||
self.eventMux.Post(RemovedTransactionEvent{diff})
|
// Must be posted in a goroutine because of the transaction pool trying
|
||||||
|
// to acquire the chain manager lock
|
||||||
|
go self.eventMux.Post(RemovedTransactionEvent{diff})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue