mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Merge branch 'feature-strict-account_info' into develop
Conflicts: src/cpp/ripple/LedgerMaster.cpp
This commit is contained in:
@@ -437,7 +437,18 @@ Json::Value RPCParser::parseAccountLines(const Json::Value& jvParams)
|
||||
Json::Value RPCParser::parseAccountRaw(const Json::Value& jvParams, bool bPeer)
|
||||
{
|
||||
std::string strIdent = jvParams[0u].asString();
|
||||
std::string strPeer = bPeer && jvParams.size() >= 2 ? jvParams[1u].asString() : "";
|
||||
unsigned int iCursor = jvParams.size();
|
||||
bool bStrict = false;
|
||||
std::string strPeer;
|
||||
|
||||
if (!bPeer && iCursor >= 2 && jvParams[iCursor-1] == "strict")
|
||||
{
|
||||
bStrict = true;
|
||||
--iCursor;
|
||||
}
|
||||
|
||||
if (bPeer && iCursor >= 2)
|
||||
strPeer = jvParams[iCursor].asString();
|
||||
|
||||
int iIndex = 0;
|
||||
// int iIndex = jvParams.size() >= 2 ? lexical_cast_s<int>(jvParams[1u].asString()) : 0;
|
||||
@@ -452,6 +463,9 @@ Json::Value RPCParser::parseAccountRaw(const Json::Value& jvParams, bool bPeer)
|
||||
|
||||
jvRequest["account"] = strIdent;
|
||||
|
||||
if (bStrict)
|
||||
jvRequest["strict"] = 1;
|
||||
|
||||
if (iIndex)
|
||||
jvRequest["account_index"] = iIndex;
|
||||
|
||||
@@ -465,7 +479,7 @@ Json::Value RPCParser::parseAccountRaw(const Json::Value& jvParams, bool bPeer)
|
||||
jvRequest["peer"] = strPeer;
|
||||
}
|
||||
|
||||
if (jvParams.size() == (2+bPeer) && !jvParseLedger(jvRequest, jvParams[1u+bPeer].asString()))
|
||||
if (iCursor == (2+bPeer) && !jvParseLedger(jvRequest, jvParams[1u+bPeer].asString()))
|
||||
return rpcError(rpcLGR_IDX_MALFORMED);
|
||||
|
||||
return jvRequest;
|
||||
|
||||
@@ -2155,6 +2155,12 @@ TER RippleCalc::calcNodeAccountRev(const unsigned int uNode, PathState& psCur, c
|
||||
% psCur.saOutAct
|
||||
% psCur.saOutReq);
|
||||
|
||||
if (!saCurWantedReq.isPositive())
|
||||
{ // TEMPORARY emergency fix
|
||||
cLog(lsFATAL) << "CurWantReq was not positive";
|
||||
return tefEXCEPTION;
|
||||
}
|
||||
|
||||
assert(saCurWantedReq.isPositive()); // FIXME: We got one of these
|
||||
|
||||
// Rate: quality in : 1.0
|
||||
@@ -3023,7 +3029,10 @@ int iPass = 0;
|
||||
BOOST_FOREACH(const uint256& uOfferIndex, vuUnfundedBecame)
|
||||
{
|
||||
if (tesSUCCESS == terResult)
|
||||
{
|
||||
cLog(lsDEBUG) << "Became unfunded " << uOfferIndex.GetHex();
|
||||
terResult = lesActive.offerDelete(uOfferIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3031,7 +3040,10 @@ int iPass = 0;
|
||||
BOOST_FOREACH(const uint256& uOfferIndex, rc.musUnfundedFound)
|
||||
{
|
||||
if (tesSUCCESS == terResult)
|
||||
terResult = lesActive.offerDelete(uOfferIndex); // FIXME: This asserted
|
||||
{
|
||||
cLog(lsDEBUG) << "Delete unfunded " << uOfferIndex.GetHex();
|
||||
terResult = lesActive.offerDelete(uOfferIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ void printHelp(const po::options_description& desc)
|
||||
cerr << desc << endl;
|
||||
|
||||
cerr << "Commands: " << endl;
|
||||
cerr << " account_info <account>|<nickname>|<seed>|<pass_phrase>|<key> [<ledger>]" << endl;
|
||||
cerr << " account_info <account>|<nickname>|<seed>|<pass_phrase>|<key> [<ledger>] [strict]" << endl;
|
||||
cerr << " account_lines <account> <account>|\"\" [<ledger>]" << endl;
|
||||
cerr << " account_offers <account>|<nickname>|<account_public_key> [<ledger>]" << endl;
|
||||
cerr << " account_tx accountID [ledger_min [ledger_max [limit [offset]]]] [binary] [count] [descending]" << endl;
|
||||
|
||||
Reference in New Issue
Block a user