mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'fixripplepass' into develop
Conflicts: src/cpp/ripple/Version.h
This commit is contained in:
@@ -51,7 +51,7 @@ const int SYSTEM_WEBSOCKET_PUBLIC_PORT = 6563; // XXX Going away.
|
|||||||
#define DEFAULT_PEER_CONNECT_LOW_WATER 4
|
#define DEFAULT_PEER_CONNECT_LOW_WATER 4
|
||||||
|
|
||||||
// Grows exponentially worse.
|
// Grows exponentially worse.
|
||||||
#define DEFAULT_PATH_SEARCH_SIZE 5
|
#define DEFAULT_PATH_SEARCH_SIZE 4
|
||||||
|
|
||||||
enum SizedItemName
|
enum SizedItemName
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -912,6 +912,7 @@ TER RippleCalc::calcNodeAdvance(
|
|||||||
{
|
{
|
||||||
// No more offers. Should be done rather than fall off end of book.
|
// No more offers. Should be done rather than fall off end of book.
|
||||||
cLog(lsWARNING) << "calcNodeAdvance: Unreachable: Fell off end of order book.";
|
cLog(lsWARNING) << "calcNodeAdvance: Unreachable: Fell off end of order book.";
|
||||||
|
return mOpenLedger ? telFAILED_PROCESSING : tecFAILED_PROCESSING; // FIXME
|
||||||
assert(false);
|
assert(false);
|
||||||
|
|
||||||
terResult = tefEXCEPTION;
|
terResult = tefEXCEPTION;
|
||||||
@@ -961,6 +962,7 @@ TER RippleCalc::calcNodeAdvance(
|
|||||||
else if (!bReverse)
|
else if (!bReverse)
|
||||||
{
|
{
|
||||||
cLog(lsWARNING) << boost::str(boost::format("calcNodeAdvance: unreachable: ran out of offers"));
|
cLog(lsWARNING) << boost::str(boost::format("calcNodeAdvance: unreachable: ran out of offers"));
|
||||||
|
return mOpenLedger ? telFAILED_PROCESSING : tecFAILED_PROCESSING; // TEMPORARY
|
||||||
assert(false); // Can't run out of offers in forward direction.
|
assert(false); // Can't run out of offers in forward direction.
|
||||||
terResult = tefEXCEPTION;
|
terResult = tefEXCEPTION;
|
||||||
}
|
}
|
||||||
@@ -2665,6 +2667,16 @@ void RippleCalc::pathNext(PathState::ref psrCur, const bool bMultiQuality, const
|
|||||||
|
|
||||||
lesCurrent = lesCheckpoint.duplicate(); // Restore from checkpoint.
|
lesCurrent = lesCheckpoint.duplicate(); // Restore from checkpoint.
|
||||||
|
|
||||||
|
for (unsigned int uIndex = psrCur->vpnNodes.size(); uIndex--;)
|
||||||
|
{
|
||||||
|
PaymentNode& pnCur = psrCur->vpnNodes[uIndex];
|
||||||
|
|
||||||
|
pnCur.saRevRedeem.zero();
|
||||||
|
pnCur.saRevIssue.zero();
|
||||||
|
pnCur.saRevDeliver.zero();
|
||||||
|
pnCur.saFwdDeliver.zero();
|
||||||
|
}
|
||||||
|
|
||||||
psrCur->terStatus = calcNodeRev(uLast, *psrCur, bMultiQuality);
|
psrCur->terStatus = calcNodeRev(uLast, *psrCur, bMultiQuality);
|
||||||
|
|
||||||
cLog(lsDEBUG) << "pathNext: Path after reverse: " << psrCur->getJson();
|
cLog(lsDEBUG) << "pathNext: Path after reverse: " << psrCur->getJson();
|
||||||
@@ -2957,10 +2969,11 @@ int iPass = 0;
|
|||||||
}
|
}
|
||||||
else if (saDstAmountAct > saDstAmountReq)
|
else if (saDstAmountAct > saDstAmountReq)
|
||||||
{
|
{
|
||||||
cLog(lsWARNING) << boost::str(boost::format("rippleCalc: TOO MUCH: saDstAmountAct=%s saDstAmountReq=%s")
|
cLog(lsFATAL) << boost::str(boost::format("rippleCalc: TOO MUCH: saDstAmountAct=%s saDstAmountReq=%s")
|
||||||
% saDstAmountAct
|
% saDstAmountAct
|
||||||
% saDstAmountReq);
|
% saDstAmountReq);
|
||||||
|
|
||||||
|
return tefEXCEPTION; // TEMPORARY
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
else if (saMaxAmountAct != saMaxAmountReq && iDry != vpsExpanded.size())
|
else if (saMaxAmountAct != saMaxAmountReq && iDry != vpsExpanded.size())
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ SETUP_LOG();
|
|||||||
|
|
||||||
bool TransactionEngine::checkInvariants(TER result, const SerializedTransaction& txn, TransactionEngineParams params)
|
bool TransactionEngine::checkInvariants(TER result, const SerializedTransaction& txn, TransactionEngineParams params)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
const RippleAddress& srcAccount = txn.getFieldAccount(sfAccount);
|
const RippleAddress& srcAccount = txn.getFieldAccount(sfAccount);
|
||||||
uint32 txnSeq = txn.getFieldU32(sfSequence);
|
uint32 txnSeq = txn.getFieldU32(sfSequence);
|
||||||
|
|
||||||
@@ -65,6 +66,7 @@ bool TransactionEngine::checkInvariants(TER result, const SerializedTransaction&
|
|||||||
assert(false);
|
assert(false);
|
||||||
return tefINTERNAL;
|
return tefINTERNAL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user