A collection of small bugfixes.

This commit is contained in:
JoelKatz
2013-02-08 16:22:27 -08:00
parent 0896825b92
commit e674bcea36
5 changed files with 74 additions and 58 deletions

View File

@@ -115,15 +115,12 @@ Ledger::Ledger(const std::string& rawLedger, bool hasPrefix) :
void Ledger::setImmutable()
{
if (!mImmutable)
{
updateHash();
mImmutable = true;
if (mTransactionMap)
mTransactionMap->setImmutable();
if (mAccountStateMap)
mAccountStateMap->setImmutable();
}
updateHash();
mImmutable = true;
if (mTransactionMap)
mTransactionMap->setImmutable();
if (mAccountStateMap)
mAccountStateMap->setImmutable();
}
void Ledger::updateHash()
@@ -1425,6 +1422,7 @@ void Ledger::pendSave(bool fromConsensus)
{
if (!fromConsensus && !theApp->isNewFlag(getHash(), SF_SAVED))
return;
assert(isImmutable());
{
boost::recursive_mutex::scoped_lock sl(sPendingSaveLock);