Tidy up locks and locals.

This commit is contained in:
Tom Ritchford
2015-06-25 14:04:16 -04:00
committed by Vinnie Falco
parent 67f2a5d9d6
commit e3ac1001be
4 changed files with 25 additions and 19 deletions

View File

@@ -1024,8 +1024,9 @@ public:
setFullLedger(ledger, false, false);
mHistLedger = ledger;
if ((mFillInProgress == 0) && (Ledger::getHashByIndex(ledger->getLedgerSeq() - 1) == ledger->getParentHash()))
{ // Previous ledger is in DB
ScopedLockType sl(m_mutex);
{
// Previous ledger is in DB
ScopedLockType lock (m_mutex);
mFillInProgress = ledger->getLedgerSeq();
getApp().getJobQueue().addJob(jtADVANCE, "tryFill", std::bind (
&LedgerMasterImp::tryFill, this,