mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix the deadlock. Can't hold the LedgerMaster lock when calling a pub* function.
This commit is contained in:
@@ -122,10 +122,13 @@ Ledger::pointer LedgerMaster::closeLedger(bool recover)
|
||||
|
||||
TER LedgerMaster::doTransaction(SerializedTransaction::ref txn, TransactionEngineParams params, bool& didApply)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||
TER result = mEngine.applyTransaction(*txn, params, didApply);
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||
TER result = mEngine.applyTransaction(*txn, params, didApply);
|
||||
Ledger::pointer ledger = mEngine.getLedger();
|
||||
}
|
||||
// if (didApply)
|
||||
theApp->getOPs().pubProposedTransaction(mEngine.getLedger(), txn, result);
|
||||
theApp->getOPs().pubProposedTransaction(ledger, txn, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user