mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
With luck, a fix for the crash.
This commit is contained in:
@@ -584,12 +584,11 @@ void LedgerConsensus::Saccept(boost::shared_ptr<LedgerConsensus> This, SHAMap::p
|
||||
}
|
||||
|
||||
void LedgerConsensus::applyTransactions(SHAMap::pointer set, Ledger::pointer ledger,
|
||||
std::deque<SerializedTransaction::pointer>& failedTransactions)
|
||||
std::list<SerializedTransaction::pointer>& failedTransactions)
|
||||
{
|
||||
TransactionEngine engine(ledger);
|
||||
|
||||
SHAMapItem::pointer item = set->peekFirstItem();
|
||||
while (item)
|
||||
for (SHAMapItem::pointer item = set->peekFirstItem(); !!item; item = set->peekNextItem(item->getTag()))
|
||||
{
|
||||
Log(lsINFO) << "Processing candidate transaction: " << item->getTag().GetHex();
|
||||
#ifndef TRUST_NETWORK
|
||||
@@ -622,14 +621,13 @@ void LedgerConsensus::applyTransactions(SHAMap::pointer set, Ledger::pointer led
|
||||
Log(lsWARNING) << " Throws";
|
||||
}
|
||||
#endif
|
||||
item = set->peekNextItem(item->getTag());
|
||||
}
|
||||
|
||||
int successes;
|
||||
do
|
||||
{
|
||||
successes = 0;
|
||||
std::deque<SerializedTransaction::pointer>::iterator it = failedTransactions.begin();
|
||||
std::list<SerializedTransaction::pointer>::iterator it = failedTransactions.begin();
|
||||
while (it != failedTransactions.end())
|
||||
{
|
||||
try
|
||||
@@ -674,7 +672,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
}
|
||||
#endif
|
||||
|
||||
std::deque<SerializedTransaction::pointer> failedTransactions;
|
||||
std::list<SerializedTransaction::pointer> failedTransactions;
|
||||
applyTransactions(set, newLCL, failedTransactions);
|
||||
newLCL->setClosed();
|
||||
newLCL->setAccepted();
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define __LEDGER_CONSENSUS__
|
||||
|
||||
#include <list>
|
||||
#include <deque>
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
@@ -114,7 +113,7 @@ protected:
|
||||
void removePosition(LedgerProposal&, bool ours);
|
||||
void sendHaveTxSet(const std::vector<uint256>& txSetHashes);
|
||||
void applyTransactions(SHAMap::pointer transactionSet, Ledger::pointer targetLedger,
|
||||
std::deque<SerializedTransaction::pointer>& failedTransactions);
|
||||
std::list<SerializedTransaction::pointer>& failedTransactions);
|
||||
|
||||
// manipulating our own position
|
||||
void takeInitialPosition(Ledger::pointer initialLedger);
|
||||
|
||||
Reference in New Issue
Block a user