good morning!!!!

Skip to content
Snippets Groups Projects
Commit a6cc02f6 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

core: deadlock in chainmanager after posting RemovedTransactionEvent

This PR solves an issue with the chain manager posting a
`RemovedTransactionEvent`, the tx pool will try to
acquire the chainmanager lock which has previously been locked prior to
posting `RemovedTransactionEvent`. This results in a deadlock in the
core.
parent 49ae5385
No related branches found
No related tags found
No related merge requests found
......@@ -804,7 +804,9 @@ func (self *ChainManager) reorg(oldBlock, newBlock *types.Block) error {
DeleteReceipt(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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment