diff --git a/src/cpp/ripple/CallRPC.cpp b/src/cpp/ripple/CallRPC.cpp index 78fc2579c..a347f7a63 100644 --- a/src/cpp/ripple/CallRPC.cpp +++ b/src/cpp/ripple/CallRPC.cpp @@ -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(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; diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index 8741d1d58..e9b6b8db4 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -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); + } } } diff --git a/src/cpp/ripple/main.cpp b/src/cpp/ripple/main.cpp index 15a23767d..7cfb5cb0b 100644 --- a/src/cpp/ripple/main.cpp +++ b/src/cpp/ripple/main.cpp @@ -70,7 +70,7 @@ void printHelp(const po::options_description& desc) cerr << desc << endl; cerr << "Commands: " << endl; - cerr << " account_info |||| []" << endl; + cerr << " account_info |||| [] [strict]" << endl; cerr << " account_lines |\"\" []" << endl; cerr << " account_offers || []" << endl; cerr << " account_tx accountID [ledger_min [ledger_max [limit [offset]]]] [binary] [count] [descending]" << endl;