mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 06:10:58 +00:00
Return unfunded and expired offers when flow fails:
Payments do not remove unfunded and expired offers when a payment fails. However, offer crossing is now using the payment engine and needs to know what offers were found in a removable state, even on failure.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <ripple/protocol/Quality.h>
|
||||
#include <ripple/protocol/XRPAmount.h>
|
||||
|
||||
#include <boost/container/flat_set.hpp>
|
||||
|
||||
#include <numeric>
|
||||
#include <sstream>
|
||||
@@ -83,14 +84,14 @@ class XRPEndpointStep : public StepImp<XRPAmount, XRPAmount, XRPEndpointStep>
|
||||
revImp (
|
||||
PaymentSandbox& sb,
|
||||
ApplyView& afView,
|
||||
std::vector<uint256>& ofrsToRm,
|
||||
boost::container::flat_set<uint256>& ofrsToRm,
|
||||
XRPAmount const& out);
|
||||
|
||||
std::pair<XRPAmount, XRPAmount>
|
||||
fwdImp (
|
||||
PaymentSandbox& sb,
|
||||
ApplyView& afView,
|
||||
std::vector<uint256>& ofrsToRm,
|
||||
boost::container::flat_set<uint256>& ofrsToRm,
|
||||
XRPAmount const& in);
|
||||
|
||||
std::pair<bool, EitherAmount>
|
||||
@@ -154,7 +155,7 @@ std::pair<XRPAmount, XRPAmount>
|
||||
XRPEndpointStep::revImp (
|
||||
PaymentSandbox& sb,
|
||||
ApplyView& afView,
|
||||
std::vector<uint256>& ofrsToRm,
|
||||
boost::container::flat_set<uint256>& ofrsToRm,
|
||||
XRPAmount const& out)
|
||||
{
|
||||
auto const balance = xrpLiquid (sb, acc_);
|
||||
@@ -174,7 +175,7 @@ std::pair<XRPAmount, XRPAmount>
|
||||
XRPEndpointStep::fwdImp (
|
||||
PaymentSandbox& sb,
|
||||
ApplyView& afView,
|
||||
std::vector<uint256>& ofrsToRm,
|
||||
boost::container::flat_set<uint256>& ofrsToRm,
|
||||
XRPAmount const& in)
|
||||
{
|
||||
assert (cache_);
|
||||
|
||||
Reference in New Issue
Block a user