mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'cache_snapshot' into develop
This commit is contained in:
@@ -18,6 +18,14 @@ uint32 LedgerMaster::getCurrentLedgerIndex()
|
||||
return mCurrentLedger->getLedgerSeq();
|
||||
}
|
||||
|
||||
Ledger::ref LedgerMaster::getCurrentSnapshot()
|
||||
{
|
||||
if (!mCurrentSnapshot || (mCurrentSnapshot->getHash() != mCurrentLedger->getHash()))
|
||||
mCurrentSnapshot = boost::make_shared<Ledger>(boost::ref(*mCurrentLedger), false);
|
||||
assert(mCurrentSnapshot->isImmutable());
|
||||
return mCurrentSnapshot;
|
||||
}
|
||||
|
||||
void LedgerMaster::addHeldTransaction(Transaction::ref transaction)
|
||||
{ // returns true if transaction was added
|
||||
boost::recursive_mutex::scoped_lock ml(mLock);
|
||||
|
||||
Reference in New Issue
Block a user