mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 15:20:54 +00:00
Add support for XLS-81 Permissioned DEX (#5404)
Modified transactions: - OfferCreate - Payment Modified RPCs: - book_changes - subscribe - book_offers - ripple_path_find - path_find Spec: https://github.com/XRPLF/XRPL-Standards/pull/281
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <xrpl/protocol/jss.h>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
namespace jtx {
|
||||
@@ -34,6 +36,18 @@ paths::operator()(Env& env, JTx& jt) const
|
||||
auto const from = env.lookup(jv[jss::Account].asString());
|
||||
auto const to = env.lookup(jv[jss::Destination].asString());
|
||||
auto const amount = amountFromJson(sfAmount, jv[jss::Amount]);
|
||||
|
||||
std::optional<uint256> domain;
|
||||
if (jv.isMember(sfDomainID.jsonName))
|
||||
{
|
||||
if (!jv[sfDomainID.jsonName].isString())
|
||||
return;
|
||||
uint256 num;
|
||||
auto const s = jv[sfDomainID.jsonName].asString();
|
||||
if (num.parseHex(s))
|
||||
domain = num;
|
||||
}
|
||||
|
||||
Pathfinder pf(
|
||||
std::make_shared<RippleLineCache>(
|
||||
env.current(), env.app().journal("RippleLineCache")),
|
||||
@@ -43,6 +57,7 @@ paths::operator()(Env& env, JTx& jt) const
|
||||
in_.account,
|
||||
amount,
|
||||
std::nullopt,
|
||||
domain,
|
||||
env.app());
|
||||
if (!pf.findPaths(depth_))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user