Commit 0d78f962 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

Merge pull request #1865 from obscuren/deadlock-chainmanager-fix

core: deadlock in chainmanager after posting RemovedTransactionEvent
parents 49ae5385 a6cc02f6
...@@ -804,7 +804,9 @@ func (self *ChainManager) reorg(oldBlock, newBlock *types.Block) error { ...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment