20#include <xrpld/app/paths/Flow.h>
21#include <xrpld/app/paths/RippleCalc.h>
22#include <xrpld/app/paths/detail/FlowDebugInfo.h>
23#include <xrpld/ledger/View.h>
25#include <xrpl/basics/Log.h>
26#include <xrpl/protocol/Feature.h>
57 Input const*
const pInputs)
68 <<
"Old payment rules are required for this transaction. Assuming "
69 "this is a replay and running with the new rules.";
73 bool const defaultPaths =
76 bool const partialPayment =
81 saMaxAmountReq > beast::zero)
82 return Quality{Amounts(saMaxAmountReq, saDstAmountReq)};
87 if (saMaxAmountReq >= beast::zero ||
89 saMaxAmountReq.
getIssuer() != uSrcAccountID)
91 return saMaxAmountReq;
96 bool const ownerPaysTransferFee =
109 ownerPaysTransferFee,
118 JLOG(j.error()) <<
"Exception from flow: " << e.
what();
127 j.debug() <<
"RippleCalc Result> "
130 <<
", result: " << flowOut.
result()
131 <<
", dstAmtReq: " << saDstAmountReq
132 <<
", sendMax: " << saMaxAmountReq;
Manages partitions for logging.
beast::Journal journal(std::string const &name)
A wrapper which makes credits unavailable to balances.
void apply(RawView &to)
Apply changes to base view.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
Currency const & getCurrency() const
AccountID const & getIssuer() const
Rules const & rules() const override
Returns the tx processing rules.
static Output rippleCalculate(PaymentSandbox &view, STAmount const &saMaxAmountReq, STAmount const &saDstAmountReq, AccountID const &uDstAccountID, AccountID const &uSrcAccountID, STPathSet const &spsPaths, Logs &l, Input const *const pInputs=nullptr)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
StrandResult< TInAmt, TOutAmt > flow(PaymentSandbox const &baseView, Strand const &strand, std::optional< TInAmt > const &maxIn, TOutAmt const &out, beast::Journal j)
Request out amount from a strand.
void setResult(TER const value)