mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Merge branch 'continuousClose'
Conflicts: src/LedgerAcquire.cpp src/NetworkOPs.h Merge continuous ledger close into main branch. YAY!
This commit is contained in:
@@ -476,18 +476,6 @@ TransactionEngineResult TransactionEngine::setAuthorized(const SerializedTransac
|
||||
return terSUCCESS;
|
||||
}
|
||||
|
||||
Ledger::pointer TransactionEngine::getTransactionLedger(uint32 targetLedger)
|
||||
{
|
||||
Ledger::pointer ledger = mDefaultLedger;
|
||||
if (mAlternateLedger && (targetLedger != 0) &&
|
||||
(targetLedger != mLedger->getLedgerSeq()) && (targetLedger == mAlternateLedger->getLedgerSeq()))
|
||||
{
|
||||
Log(lsINFO) << "Transaction goes into wobble ledger";
|
||||
ledger = mAlternateLedger;
|
||||
}
|
||||
return ledger;
|
||||
}
|
||||
|
||||
bool TransactionEngine::entryExists(SLE::pointer sleEntry)
|
||||
{
|
||||
return mEntries.find(sleEntry) != mEntries.end();
|
||||
@@ -576,16 +564,10 @@ void TransactionEngine::entryUnfunded(SLE::pointer sleEntry)
|
||||
}
|
||||
|
||||
TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTransaction& txn,
|
||||
TransactionEngineParams params, uint32 targetLedger)
|
||||
{
|
||||
return applyTransaction(txn, params, getTransactionLedger(targetLedger));
|
||||
}
|
||||
|
||||
TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTransaction& txn,
|
||||
TransactionEngineParams params, Ledger::pointer ledger)
|
||||
TransactionEngineParams params)
|
||||
{
|
||||
Log(lsTRACE) << "applyTransaction>";
|
||||
mLedger = ledger;
|
||||
assert(mLedger);
|
||||
mLedgerParentCloseTime = mLedger->getParentCloseTimeNC();
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -724,12 +706,7 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
|
||||
}
|
||||
|
||||
if (terSUCCESS != terResult)
|
||||
{
|
||||
// Avoid unnecessary locking.
|
||||
mLedger = Ledger::pointer();
|
||||
|
||||
return terResult;
|
||||
}
|
||||
|
||||
boost::recursive_mutex::scoped_lock sl(mLedger->mLock);
|
||||
|
||||
@@ -1072,7 +1049,6 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
|
||||
mLedger->destroyCoins(saPaid.getNValue());
|
||||
}
|
||||
|
||||
mLedger = Ledger::pointer();
|
||||
mEntries.clear();
|
||||
|
||||
return terResult;
|
||||
|
||||
Reference in New Issue
Block a user