mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 23:45:51 +00:00
Fix a crash bug Arthur reported.
This commit is contained in:
@@ -128,6 +128,7 @@ TER LedgerMaster::doTransaction(const SerializedTransaction& txn, TransactionEng
|
|||||||
|
|
||||||
bool LedgerMaster::haveLedgerRange(uint32 from, uint32 to)
|
bool LedgerMaster::haveLedgerRange(uint32 from, uint32 to)
|
||||||
{
|
{
|
||||||
|
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||||
uint32 prevMissing = mCompleteLedgers.prevMissing(to + 1);
|
uint32 prevMissing = mCompleteLedgers.prevMissing(to + 1);
|
||||||
return (prevMissing == RangeSet::RangeSetAbsent) || (prevMissing < from);
|
return (prevMissing == RangeSet::RangeSetAbsent) || (prevMissing < from);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,11 @@ public:
|
|||||||
|
|
||||||
void switchLedgers(Ledger::ref lastClosed, Ledger::ref newCurrent);
|
void switchLedgers(Ledger::ref lastClosed, Ledger::ref newCurrent);
|
||||||
|
|
||||||
std::string getCompleteLedgers() { return mCompleteLedgers.toString(); }
|
std::string getCompleteLedgers()
|
||||||
|
{
|
||||||
|
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||||
|
return mCompleteLedgers.toString();
|
||||||
|
}
|
||||||
|
|
||||||
Ledger::pointer closeLedger(bool recoverHeldTransactions);
|
Ledger::pointer closeLedger(bool recoverHeldTransactions);
|
||||||
|
|
||||||
@@ -108,7 +112,11 @@ public:
|
|||||||
return mLedgerHistory.getLedgerByHash(hash);
|
return mLedgerHistory.getLedgerByHash(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLedgerRangePresent(uint32 minV, uint32 maxV) { mCompleteLedgers.setRange(minV, maxV); }
|
void setLedgerRangePresent(uint32 minV, uint32 maxV)
|
||||||
|
{
|
||||||
|
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||||
|
mCompleteLedgers.setRange(minV, maxV);
|
||||||
|
}
|
||||||
|
|
||||||
void addHeldTransaction(const Transaction::pointer& trans);
|
void addHeldTransaction(const Transaction::pointer& trans);
|
||||||
void fixMismatch(Ledger::ref ledger);
|
void fixMismatch(Ledger::ref ledger);
|
||||||
|
|||||||
Reference in New Issue
Block a user