mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Don't try to rescue transactions that made it into the closed ledger.
This commit is contained in:
@@ -735,15 +735,15 @@ void LedgerConsensus::applyTransaction(TransactionEngine& engine, SerializedTran
|
||||
#endif
|
||||
}
|
||||
|
||||
void LedgerConsensus::applyTransactions(SHAMap::pointer set, Ledger::pointer ledger,
|
||||
void LedgerConsensus::applyTransactions(SHAMap::pointer set, Ledger::pointer applyLedger, Ledger::pointer checkLedger,
|
||||
CanonicalTXSet& failedTransactions, bool final)
|
||||
{
|
||||
TransactionEngineParams parms = final ? (tepNO_CHECK_FEE | tepUPDATE_TOTAL) : tepNONE;
|
||||
TransactionEngine engine(ledger);
|
||||
TransactionEngine engine(applyLedger);
|
||||
|
||||
for (SHAMapItem::pointer item = set->peekFirstItem(); !!item; item = set->peekNextItem(item->getTag()))
|
||||
{
|
||||
if (!ledger->hasTransaction(item->getTag()))
|
||||
if (!checkLedger->hasTransaction(item->getTag()))
|
||||
{
|
||||
Log(lsINFO) << "Processing candidate transaction: " << item->getTag().GetHex();
|
||||
#ifndef TRUST_NETWORK
|
||||
@@ -752,7 +752,7 @@ void LedgerConsensus::applyTransactions(SHAMap::pointer set, Ledger::pointer led
|
||||
#endif
|
||||
SerializerIterator sit(item->peekSerializer());
|
||||
SerializedTransaction::pointer txn = boost::make_shared<SerializedTransaction>(boost::ref(sit));
|
||||
applyTransaction(engine, txn, ledger, failedTransactions, final);
|
||||
applyTransaction(engine, txn, applyLedger, failedTransactions, final);
|
||||
#ifndef TRUST_NETWORK
|
||||
}
|
||||
catch (...)
|
||||
@@ -803,7 +803,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
newLCL->armDirty();
|
||||
|
||||
CanonicalTXSet failedTransactions(set->getHash());
|
||||
applyTransactions(set, newLCL, failedTransactions, true);
|
||||
applyTransactions(set, newLCL, newLCL, failedTransactions, true);
|
||||
newLCL->setClosed();
|
||||
|
||||
uint32 closeTime = mOurPosition->getCloseTime();
|
||||
@@ -859,7 +859,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
}
|
||||
|
||||
Log(lsINFO) << "Applying transactions from current ledger";
|
||||
applyTransactions(theApp->getMasterLedger().getCurrentLedger()->peekTransactionMap(), newOL,
|
||||
applyTransactions(theApp->getMasterLedger().getCurrentLedger()->peekTransactionMap(), newOL, newLCL,
|
||||
failedTransactions, false);
|
||||
theApp->getMasterLedger().pushLedger(newLCL, newOL);
|
||||
mNewLedgerHash = newLCL->getHash();
|
||||
|
||||
@@ -125,7 +125,7 @@ protected:
|
||||
void addPosition(LedgerProposal&, bool ours);
|
||||
void removePosition(LedgerProposal&, bool ours);
|
||||
void sendHaveTxSet(const uint256& set, bool direct);
|
||||
void applyTransactions(SHAMap::pointer transactionSet, Ledger::pointer targetLedger,
|
||||
void applyTransactions(SHAMap::pointer transactionSet, Ledger::pointer targetLedger, Ledger::pointer checkLedger,
|
||||
CanonicalTXSet& failedTransactions, bool final);
|
||||
void applyTransaction(TransactionEngine& engine, SerializedTransaction::pointer txn, Ledger::pointer targetLedger,
|
||||
CanonicalTXSet& failedTransactions, bool final);
|
||||
|
||||
Reference in New Issue
Block a user