From ba436a62a067a2d0bac12fc094b602e79e4d66a4 Mon Sep 17 00:00:00 2001 From: Lathan Britz Date: Mon, 9 Mar 2026 12:55:50 -0300 Subject: [PATCH 01/22] expand the pathing tables to look at different routes, as logic X->XRP tends to limit it and it is missing many viable options --- src/xrpld/app/paths/PathRequest.h | 3 ++- src/xrpld/app/paths/Pathfinder.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xrpld/app/paths/PathRequest.h b/src/xrpld/app/paths/PathRequest.h index fde499a3127..eb367a037ac 100644 --- a/src/xrpld/app/paths/PathRequest.h +++ b/src/xrpld/app/paths/PathRequest.h @@ -154,7 +154,8 @@ class PathRequest final : public InfoSubRequest, std::chrono::steady_clock::time_point quick_reply_; std::chrono::steady_clock::time_point full_reply_; - static unsigned int const max_paths_ = 4; + // payments accept up to 6 paths + static unsigned int const max_paths_ = 7; }; } // namespace xrpl diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 254db35ea5b..fbff4b5d5f1 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -1236,7 +1236,10 @@ Pathfinder::initPathTable() {6, "saaxd"}, {7, "sbxd"}, {8, "sabxd"}, - {9, "sabaxd"}}); + {9, "sabaxd"}, + {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest + {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest + {6, "sabbxd"}}); // source -> gateway -> book -> book -> book(XRP) -> dest // non-XRP to non-XRP (same currency) fillPaths( From 8e4988484e64393b9ed65a7512cd4c8af83ec79b Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Mon, 9 Mar 2026 16:13:54 -0300 Subject: [PATCH 02/22] resolve the cost ordering --- src/xrpld/app/paths/Pathfinder.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index fbff4b5d5f1..4974cd56048 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -1233,13 +1233,13 @@ Pathfinder::initPathTable() pt_nonXRP_to_XRP, {{1, "sxd"}, // gateway buys XRP {2, "saxd"}, // source -> gateway -> book(XRP) -> dest - {6, "saaxd"}, - {7, "sbxd"}, - {8, "sabxd"}, - {9, "sabaxd"}, {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest + {6, "saaxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest - {6, "sabbxd"}}); // source -> gateway -> book -> book -> book(XRP) -> dest + {6, "sabbxd"}, + {7, "sbxd"}, + {8, "sabxd"}, + {9, "sabaxd"}}); // non-XRP to non-XRP (same currency) fillPaths( From f360a98e59250651046a6add53294afe4ab3332a Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Mon, 9 Mar 2026 17:12:39 -0300 Subject: [PATCH 03/22] remove unwanted copy error in comment and account for fullLiquidityPath which can be appended --- src/xrpld/app/paths/PathRequest.h | 4 ++-- src/xrpld/app/paths/Pathfinder.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xrpld/app/paths/PathRequest.h b/src/xrpld/app/paths/PathRequest.h index eb367a037ac..1b99a70777c 100644 --- a/src/xrpld/app/paths/PathRequest.h +++ b/src/xrpld/app/paths/PathRequest.h @@ -154,8 +154,8 @@ class PathRequest final : public InfoSubRequest, std::chrono::steady_clock::time_point quick_reply_; std::chrono::steady_clock::time_point full_reply_; - // payments accept up to 6 paths - static unsigned int const max_paths_ = 7; + // payments accept up to 6 paths - account for fullLiquidityPath can be appended + static unsigned int const max_paths_ = 5; }; } // namespace xrpl diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 4974cd56048..1456d394a8b 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -1234,7 +1234,7 @@ Pathfinder::initPathTable() {{1, "sxd"}, // gateway buys XRP {2, "saxd"}, // source -> gateway -> book(XRP) -> dest {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest - {6, "saaxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest + {6, "saaxd"}, {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest {6, "sabbxd"}, {7, "sbxd"}, From a71924cf2279a40bbc82a8032eb6fa8df72abd98 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Tue, 10 Mar 2026 18:20:20 -0300 Subject: [PATCH 04/22] fix formatting complaints --- src/xrpld/app/paths/Pathfinder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 1456d394a8b..61e4e0e35b3 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -1231,11 +1231,11 @@ Pathfinder::initPathTable() fillPaths( pt_nonXRP_to_XRP, - {{1, "sxd"}, // gateway buys XRP - {2, "saxd"}, // source -> gateway -> book(XRP) -> dest + {{1, "sxd"}, // gateway buys XRP + {2, "saxd"}, // source -> gateway -> book(XRP) -> dest {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest {6, "saaxd"}, - {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest + {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest {6, "sabbxd"}, {7, "sbxd"}, {8, "sabxd"}, From f09a13104f37ed8adeb7355cdef32253263faf03 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Wed, 11 Mar 2026 17:43:55 -0300 Subject: [PATCH 05/22] less hops better perfomance for simialr result. --- src/xrpld/app/paths/Pathfinder.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 61e4e0e35b3..09e411584a9 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -1233,12 +1233,11 @@ Pathfinder::initPathTable() pt_nonXRP_to_XRP, {{1, "sxd"}, // gateway buys XRP {2, "saxd"}, // source -> gateway -> book(XRP) -> dest - {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest + {5, "sabxd"}, // source -> gateway -> book -> book(XRP) -> dest {6, "saaxd"}, - {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest - {6, "sabbxd"}, {7, "sbxd"}, {8, "sabxd"}, + {8, "sabbxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest {9, "sabaxd"}}); // non-XRP to non-XRP (same currency) From 05f1beae146bdd8f6b505b67795a592a32c0ef35 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Wed, 11 Mar 2026 18:39:44 -0300 Subject: [PATCH 06/22] remove duplicate and kept the shallower weigth as it was to far down to produce any usable results --- src/xrpld/app/paths/Pathfinder.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 09e411584a9..e848642fe46 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -1236,7 +1236,6 @@ Pathfinder::initPathTable() {5, "sabxd"}, // source -> gateway -> book -> book(XRP) -> dest {6, "saaxd"}, {7, "sbxd"}, - {8, "sabxd"}, {8, "sabbxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest {9, "sabaxd"}}); From 5814b02c2658af38429a8fa4298bd14919cafbb3 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Wed, 11 Mar 2026 19:16:52 -0300 Subject: [PATCH 07/22] add tests for max_paths_ ceiling --- src/test/app/Path_test.cpp | 154 ++++++++++++++++++++++++++++++ src/xrpld/app/paths/PathRequest.h | 2 +- 2 files changed, 155 insertions(+), 1 deletion(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index c2de4f3f086..d530ca9dbba 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -4,6 +4,8 @@ #include #include +#include +#include #include #include @@ -651,6 +653,156 @@ class Path_test : public beast::unit_test::suite BEAST_EXPECT(equal(sa, Account("alice")["USD"](5))); } + Json::Value + six_path_append_request_result() + { + using namespace jtx; + Env env = pathTestEnv(); + + Account A1{"A1"}; + Account A2{"A2"}; + Account G1{"G1"}; + Account G2{"G2"}; + Account M1{"M1"}; + Account M2{"M2"}; + Account M3{"M3"}; + Account M4{"M4"}; + Account M5{"M5"}; + Account M6{"M6"}; + Account MM{"MM"}; + + env.fund(XRP(1000), A1, A2, G1, G2, M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env.trust(G1["HKD"](2000), A1); + env.trust(G2["HKD"](2000), A2); + + env.trust(G1["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.trust(G2["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env(pay(G1, A1, G1["HKD"](1000))); + + env(pay(G1, M1, G1["HKD"](10))); + env(pay(G1, M2, G1["HKD"](10))); + env(pay(G1, M3, G1["HKD"](10))); + env(pay(G1, M4, G1["HKD"](10))); + env(pay(G1, M5, G1["HKD"](10))); + env(pay(G1, M6, G1["HKD"](10))); + env(pay(G1, MM, G1["HKD"](1000))); + + env(pay(G2, M1, G2["HKD"](10))); + env(pay(G2, M2, G2["HKD"](10))); + env(pay(G2, M3, G2["HKD"](10))); + env(pay(G2, M4, G2["HKD"](10))); + env(pay(G2, M5, G2["HKD"](10))); + env(pay(G2, M6, G2["HKD"](10))); + env(pay(G2, MM, G2["HKD"](1000))); + env.close(); + + env(offer(MM, G1["HKD"](1000), G2["HKD"](100))); + env.close(); + + return find_paths_request(env, A1, A2, A2["HKD"](60), std::nullopt, G1["HKD"].currency); + } + + void + pathfind_paths_computed_never_exceeds_six() + { + testcase("pathfind paths_computed never exceeds six"); + + auto const result = six_path_append_request_result(); + BEAST_EXPECT(result.isMember(jss::alternatives)); + if (!result.isMember(jss::alternatives) || !result[jss::alternatives].isArray()) + return; + + for (auto const& alt : result[jss::alternatives]) + { + if (!alt.isMember(jss::paths_computed)) + continue; + BEAST_EXPECT(alt[jss::paths_computed].isArray()); + if (alt[jss::paths_computed].isArray()) + BEAST_EXPECT(alt[jss::paths_computed].size() <= 6); + } + } + + void + pathfind_can_return_six_paths_with_append() + { + testcase("pathfind can return six paths with append"); + using namespace jtx; + Env env = pathTestEnv(); + + Account A1{"A1"}; + Account A2{"A2"}; + Account G1{"G1"}; + Account G2{"G2"}; + Account M1{"M1"}; + Account M2{"M2"}; + Account M3{"M3"}; + Account M4{"M4"}; + Account M5{"M5"}; + Account M6{"M6"}; + Account MM{"MM"}; + + env.fund(XRP(1000), A1, A2, G1, G2, M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env.trust(G1["HKD"](2000), A1); + env.trust(G2["HKD"](2000), A2); + + env.trust(G1["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.trust(G2["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env(pay(G1, A1, G1["HKD"](1000))); + + env(pay(G1, M1, G1["HKD"](10))); + env(pay(G1, M2, G1["HKD"](10))); + env(pay(G1, M3, G1["HKD"](10))); + env(pay(G1, M4, G1["HKD"](10))); + env(pay(G1, M5, G1["HKD"](10))); + env(pay(G1, M6, G1["HKD"](10))); + env(pay(G1, MM, G1["HKD"](1000))); + + env(pay(G2, M1, G2["HKD"](10))); + env(pay(G2, M2, G2["HKD"](10))); + env(pay(G2, M3, G2["HKD"](10))); + env(pay(G2, M4, G2["HKD"](10))); + env(pay(G2, M5, G2["HKD"](10))); + env(pay(G2, M6, G2["HKD"](10))); + env(pay(G2, MM, G2["HKD"](1000))); + env.close(); + + env(offer(MM, G1["HKD"](1000), G2["HKD"](100))); + env.close(); + + auto cache = + std::make_shared(env.current(), env.app().journal("RippleLineCache")); + Pathfinder pf( + cache, + A1.id(), + A2.id(), + G1["HKD"].currency, + std::nullopt, + A2["HKD"](60), + std::nullopt, + std::nullopt, + env.app()); + + BEAST_EXPECT(pf.findPaths(7)); + pf.computePathRanks(5); + + STPath fullLiquidityPath; + auto bestPaths = pf.getBestPaths(5, fullLiquidityPath, STPathSet{}, A1.id()); + BEAST_EXPECT(bestPaths.size() == 5); + BEAST_EXPECT(!fullLiquidityPath.empty()); + + if (!fullLiquidityPath.empty()) + bestPaths.push_back(fullLiquidityPath); + BEAST_EXPECT(bestPaths.size() == 6); + } + void issues_path_negative_issue(bool const domainEnabled) { @@ -1875,6 +2027,8 @@ class Path_test : public beast::unit_test::suite hybrid_offer_path(); amm_domain_path(); + pathfind_paths_computed_never_exceeds_six(); + pathfind_can_return_six_paths_with_append(); } }; diff --git a/src/xrpld/app/paths/PathRequest.h b/src/xrpld/app/paths/PathRequest.h index 1b99a70777c..e565566ae8a 100644 --- a/src/xrpld/app/paths/PathRequest.h +++ b/src/xrpld/app/paths/PathRequest.h @@ -154,7 +154,7 @@ class PathRequest final : public InfoSubRequest, std::chrono::steady_clock::time_point quick_reply_; std::chrono::steady_clock::time_point full_reply_; - // payments accept up to 6 paths - account for fullLiquidityPath can be appended + // payments accept up to 6 paths - account for +1 fullLiquidityPath can be appended static unsigned int const max_paths_ = 5; }; From ebe963fa72b9180887690095153d5430a76c90f8 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Thu, 12 Mar 2026 14:37:00 -0300 Subject: [PATCH 08/22] address test issues --- src/test/app/Path_test.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index d530ca9dbba..561ae0fd2f0 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -713,17 +713,24 @@ class Path_test : public beast::unit_test::suite auto const result = six_path_append_request_result(); BEAST_EXPECT(result.isMember(jss::alternatives)); - if (!result.isMember(jss::alternatives) || !result[jss::alternatives].isArray()) + if (!result.isMember(jss::alternatives)) return; + BEAST_EXPECT(result[jss::alternatives].isArray()); + if (!result[jss::alternatives].isArray()) + return; + + bool sawPathsComputed = false; for (auto const& alt : result[jss::alternatives]) { if (!alt.isMember(jss::paths_computed)) continue; + sawPathsComputed = true; BEAST_EXPECT(alt[jss::paths_computed].isArray()); if (alt[jss::paths_computed].isArray()) BEAST_EXPECT(alt[jss::paths_computed].size() <= 6); } + BEAST_EXPECT(sawPathsComputed); } void From 94bd7ae2d1fa739d926b235e5a2ba08fc33c649e Mon Sep 17 00:00:00 2001 From: shortthefomo <508629+shortthefomo@users.noreply.github.com> Date: Thu, 26 Mar 2026 01:42:02 -0300 Subject: [PATCH 09/22] upstream refactoring fix includes --- src/test/app/Path_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index 63116db05e4..55deb2374e1 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -4,8 +4,8 @@ #include #include -#include -#include +#include +#include #include #include From 391fe2ed75762ea4155f03445fc6ce2d402099d2 Mon Sep 17 00:00:00 2001 From: shortthefomo <508629+shortthefomo@users.noreply.github.com> Date: Fri, 27 Mar 2026 17:55:21 -0300 Subject: [PATCH 10/22] fix build errors due to upstream changes --- src/test/app/Path_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index 55deb2374e1..a911669c74d 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -787,7 +787,7 @@ class Path_test : public beast::unit_test::suite env.close(); auto cache = - std::make_shared(env.current(), env.app().journal("RippleLineCache")); + std::make_shared(env.current(), env.app().getJournal("RippleLineCache")); Pathfinder pf( cache, A1.id(), From 8f6e818c1e5f9afeb6217256294d5542d031dfef Mon Sep 17 00:00:00 2001 From: Lathan Britz Date: Mon, 9 Mar 2026 12:55:50 -0300 Subject: [PATCH 11/22] expand the pathing tables to look at different routes, as logic X->XRP tends to limit it and it is missing many viable options --- src/xrpld/rpc/detail/PathRequest.h | 3 ++- src/xrpld/rpc/detail/Pathfinder.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xrpld/rpc/detail/PathRequest.h b/src/xrpld/rpc/detail/PathRequest.h index db173e307b1..069af631f92 100644 --- a/src/xrpld/rpc/detail/PathRequest.h +++ b/src/xrpld/rpc/detail/PathRequest.h @@ -154,7 +154,8 @@ class PathRequest final : public InfoSubRequest, std::chrono::steady_clock::time_point quick_reply_; std::chrono::steady_clock::time_point full_reply_; - static unsigned int const max_paths_ = 4; + // payments accept up to 6 paths + static unsigned int const max_paths_ = 7; }; } // namespace xrpl diff --git a/src/xrpld/rpc/detail/Pathfinder.cpp b/src/xrpld/rpc/detail/Pathfinder.cpp index 4749caaccba..9bba83f3838 100644 --- a/src/xrpld/rpc/detail/Pathfinder.cpp +++ b/src/xrpld/rpc/detail/Pathfinder.cpp @@ -1254,7 +1254,10 @@ Pathfinder::initPathTable() {6, "saaxd"}, {7, "sbxd"}, {8, "sabxd"}, - {9, "sabaxd"}}); + {9, "sabaxd"}, + {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest + {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest + {6, "sabbxd"}}); // source -> gateway -> book -> book -> book(XRP) -> dest // non-XRP to non-XRP (same currency) fillPaths( From c659fb8178ec132749c9ca7db4697086730ac22e Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Mon, 9 Mar 2026 16:13:54 -0300 Subject: [PATCH 12/22] resolve the cost ordering --- src/xrpld/rpc/detail/Pathfinder.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrpld/rpc/detail/Pathfinder.cpp b/src/xrpld/rpc/detail/Pathfinder.cpp index 9bba83f3838..1210b2d8933 100644 --- a/src/xrpld/rpc/detail/Pathfinder.cpp +++ b/src/xrpld/rpc/detail/Pathfinder.cpp @@ -1251,13 +1251,13 @@ Pathfinder::initPathTable() pt_nonXRP_to_XRP, {{1, "sxd"}, // gateway buys XRP {2, "saxd"}, // source -> gateway -> book(XRP) -> dest - {6, "saaxd"}, - {7, "sbxd"}, - {8, "sabxd"}, - {9, "sabaxd"}, {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest + {6, "saaxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest - {6, "sabbxd"}}); // source -> gateway -> book -> book -> book(XRP) -> dest + {6, "sabbxd"}, + {7, "sbxd"}, + {8, "sabxd"}, + {9, "sabaxd"}}); // non-XRP to non-XRP (same currency) fillPaths( From b8e04e64d7291708541e1f19c923fc2fb52f1609 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Mon, 9 Mar 2026 17:12:39 -0300 Subject: [PATCH 13/22] remove unwanted copy error in comment and account for fullLiquidityPath which can be appended --- src/xrpld/rpc/detail/PathRequest.h | 4 ++-- src/xrpld/rpc/detail/Pathfinder.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xrpld/rpc/detail/PathRequest.h b/src/xrpld/rpc/detail/PathRequest.h index 069af631f92..0a5dbee0607 100644 --- a/src/xrpld/rpc/detail/PathRequest.h +++ b/src/xrpld/rpc/detail/PathRequest.h @@ -154,8 +154,8 @@ class PathRequest final : public InfoSubRequest, std::chrono::steady_clock::time_point quick_reply_; std::chrono::steady_clock::time_point full_reply_; - // payments accept up to 6 paths - static unsigned int const max_paths_ = 7; + // payments accept up to 6 paths - account for fullLiquidityPath can be appended + static unsigned int const max_paths_ = 5; }; } // namespace xrpl diff --git a/src/xrpld/rpc/detail/Pathfinder.cpp b/src/xrpld/rpc/detail/Pathfinder.cpp index 1210b2d8933..30c4c950b49 100644 --- a/src/xrpld/rpc/detail/Pathfinder.cpp +++ b/src/xrpld/rpc/detail/Pathfinder.cpp @@ -1252,7 +1252,7 @@ Pathfinder::initPathTable() {{1, "sxd"}, // gateway buys XRP {2, "saxd"}, // source -> gateway -> book(XRP) -> dest {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest - {6, "saaxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest + {6, "saaxd"}, {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest {6, "sabbxd"}, {7, "sbxd"}, From 63d254e3bcaaa91f3c0139e98ef8b7696b21d5b9 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Tue, 10 Mar 2026 18:20:20 -0300 Subject: [PATCH 14/22] fix formatting complaints --- src/xrpld/rpc/detail/Pathfinder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xrpld/rpc/detail/Pathfinder.cpp b/src/xrpld/rpc/detail/Pathfinder.cpp index 30c4c950b49..00dcf78032a 100644 --- a/src/xrpld/rpc/detail/Pathfinder.cpp +++ b/src/xrpld/rpc/detail/Pathfinder.cpp @@ -1249,11 +1249,11 @@ Pathfinder::initPathTable() fillPaths( pt_nonXRP_to_XRP, - {{1, "sxd"}, // gateway buys XRP - {2, "saxd"}, // source -> gateway -> book(XRP) -> dest + {{1, "sxd"}, // gateway buys XRP + {2, "saxd"}, // source -> gateway -> book(XRP) -> dest {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest {6, "saaxd"}, - {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest + {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest {6, "sabbxd"}, {7, "sbxd"}, {8, "sabxd"}, From 1db024166a931a0cea647e3660143a8f6d3fe255 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Wed, 11 Mar 2026 17:43:55 -0300 Subject: [PATCH 15/22] less hops better perfomance for simialr result. --- src/xrpld/rpc/detail/Pathfinder.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xrpld/rpc/detail/Pathfinder.cpp b/src/xrpld/rpc/detail/Pathfinder.cpp index 00dcf78032a..905d8a56e89 100644 --- a/src/xrpld/rpc/detail/Pathfinder.cpp +++ b/src/xrpld/rpc/detail/Pathfinder.cpp @@ -1251,12 +1251,11 @@ Pathfinder::initPathTable() pt_nonXRP_to_XRP, {{1, "sxd"}, // gateway buys XRP {2, "saxd"}, // source -> gateway -> book(XRP) -> dest - {5, "sbbxd"}, // source -> book -> book -> book(XRP) -> dest + {5, "sabxd"}, // source -> gateway -> book -> book(XRP) -> dest {6, "saaxd"}, - {6, "sbabxd"}, // source -> book -> gateway -> book -> book(XRP) -> dest - {6, "sabbxd"}, {7, "sbxd"}, {8, "sabxd"}, + {8, "sabbxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest {9, "sabaxd"}}); // non-XRP to non-XRP (same currency) From 69e28bd5ef4cb3f84044f0dc6afc9899f6c99fba Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Wed, 11 Mar 2026 18:39:44 -0300 Subject: [PATCH 16/22] remove duplicate and kept the shallower weigth as it was to far down to produce any usable results --- src/xrpld/rpc/detail/Pathfinder.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/xrpld/rpc/detail/Pathfinder.cpp b/src/xrpld/rpc/detail/Pathfinder.cpp index 905d8a56e89..98ca8bfa9a9 100644 --- a/src/xrpld/rpc/detail/Pathfinder.cpp +++ b/src/xrpld/rpc/detail/Pathfinder.cpp @@ -1254,7 +1254,6 @@ Pathfinder::initPathTable() {5, "sabxd"}, // source -> gateway -> book -> book(XRP) -> dest {6, "saaxd"}, {7, "sbxd"}, - {8, "sabxd"}, {8, "sabbxd"}, // source -> gateway -> book -> book -> book(XRP) -> dest {9, "sabaxd"}}); From f8b675e59d8702f34ca701bdd737f258a4db375c Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Wed, 11 Mar 2026 19:16:52 -0300 Subject: [PATCH 17/22] add tests for max_paths_ ceiling --- src/test/app/Path_test.cpp | 154 +++++++++++++++++++++++++++++ src/xrpld/rpc/detail/PathRequest.h | 2 +- 2 files changed, 155 insertions(+), 1 deletion(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index 841847d1834..160fdd21bdd 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -4,6 +4,8 @@ #include #include +#include +#include #include #include @@ -653,6 +655,156 @@ class Path_test : public beast::unit_test::suite BEAST_EXPECT(equal(sa, Account("alice")["USD"](5))); } + Json::Value + six_path_append_request_result() + { + using namespace jtx; + Env env = pathTestEnv(); + + Account A1{"A1"}; + Account A2{"A2"}; + Account G1{"G1"}; + Account G2{"G2"}; + Account M1{"M1"}; + Account M2{"M2"}; + Account M3{"M3"}; + Account M4{"M4"}; + Account M5{"M5"}; + Account M6{"M6"}; + Account MM{"MM"}; + + env.fund(XRP(1000), A1, A2, G1, G2, M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env.trust(G1["HKD"](2000), A1); + env.trust(G2["HKD"](2000), A2); + + env.trust(G1["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.trust(G2["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env(pay(G1, A1, G1["HKD"](1000))); + + env(pay(G1, M1, G1["HKD"](10))); + env(pay(G1, M2, G1["HKD"](10))); + env(pay(G1, M3, G1["HKD"](10))); + env(pay(G1, M4, G1["HKD"](10))); + env(pay(G1, M5, G1["HKD"](10))); + env(pay(G1, M6, G1["HKD"](10))); + env(pay(G1, MM, G1["HKD"](1000))); + + env(pay(G2, M1, G2["HKD"](10))); + env(pay(G2, M2, G2["HKD"](10))); + env(pay(G2, M3, G2["HKD"](10))); + env(pay(G2, M4, G2["HKD"](10))); + env(pay(G2, M5, G2["HKD"](10))); + env(pay(G2, M6, G2["HKD"](10))); + env(pay(G2, MM, G2["HKD"](1000))); + env.close(); + + env(offer(MM, G1["HKD"](1000), G2["HKD"](100))); + env.close(); + + return find_paths_request(env, A1, A2, A2["HKD"](60), std::nullopt, G1["HKD"].currency); + } + + void + pathfind_paths_computed_never_exceeds_six() + { + testcase("pathfind paths_computed never exceeds six"); + + auto const result = six_path_append_request_result(); + BEAST_EXPECT(result.isMember(jss::alternatives)); + if (!result.isMember(jss::alternatives) || !result[jss::alternatives].isArray()) + return; + + for (auto const& alt : result[jss::alternatives]) + { + if (!alt.isMember(jss::paths_computed)) + continue; + BEAST_EXPECT(alt[jss::paths_computed].isArray()); + if (alt[jss::paths_computed].isArray()) + BEAST_EXPECT(alt[jss::paths_computed].size() <= 6); + } + } + + void + pathfind_can_return_six_paths_with_append() + { + testcase("pathfind can return six paths with append"); + using namespace jtx; + Env env = pathTestEnv(); + + Account A1{"A1"}; + Account A2{"A2"}; + Account G1{"G1"}; + Account G2{"G2"}; + Account M1{"M1"}; + Account M2{"M2"}; + Account M3{"M3"}; + Account M4{"M4"}; + Account M5{"M5"}; + Account M6{"M6"}; + Account MM{"MM"}; + + env.fund(XRP(1000), A1, A2, G1, G2, M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env.trust(G1["HKD"](2000), A1); + env.trust(G2["HKD"](2000), A2); + + env.trust(G1["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.trust(G2["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.close(); + + env(pay(G1, A1, G1["HKD"](1000))); + + env(pay(G1, M1, G1["HKD"](10))); + env(pay(G1, M2, G1["HKD"](10))); + env(pay(G1, M3, G1["HKD"](10))); + env(pay(G1, M4, G1["HKD"](10))); + env(pay(G1, M5, G1["HKD"](10))); + env(pay(G1, M6, G1["HKD"](10))); + env(pay(G1, MM, G1["HKD"](1000))); + + env(pay(G2, M1, G2["HKD"](10))); + env(pay(G2, M2, G2["HKD"](10))); + env(pay(G2, M3, G2["HKD"](10))); + env(pay(G2, M4, G2["HKD"](10))); + env(pay(G2, M5, G2["HKD"](10))); + env(pay(G2, M6, G2["HKD"](10))); + env(pay(G2, MM, G2["HKD"](1000))); + env.close(); + + env(offer(MM, G1["HKD"](1000), G2["HKD"](100))); + env.close(); + + auto cache = + std::make_shared(env.current(), env.app().journal("RippleLineCache")); + Pathfinder pf( + cache, + A1.id(), + A2.id(), + G1["HKD"].currency, + std::nullopt, + A2["HKD"](60), + std::nullopt, + std::nullopt, + env.app()); + + BEAST_EXPECT(pf.findPaths(7)); + pf.computePathRanks(5); + + STPath fullLiquidityPath; + auto bestPaths = pf.getBestPaths(5, fullLiquidityPath, STPathSet{}, A1.id()); + BEAST_EXPECT(bestPaths.size() == 5); + BEAST_EXPECT(!fullLiquidityPath.empty()); + + if (!fullLiquidityPath.empty()) + bestPaths.push_back(fullLiquidityPath); + BEAST_EXPECT(bestPaths.size() == 6); + } + void issues_path_negative_issue(bool const domainEnabled) { @@ -1877,6 +2029,8 @@ class Path_test : public beast::unit_test::suite hybrid_offer_path(); amm_domain_path(); + pathfind_paths_computed_never_exceeds_six(); + pathfind_can_return_six_paths_with_append(); } }; diff --git a/src/xrpld/rpc/detail/PathRequest.h b/src/xrpld/rpc/detail/PathRequest.h index 0a5dbee0607..8cc5b185ac4 100644 --- a/src/xrpld/rpc/detail/PathRequest.h +++ b/src/xrpld/rpc/detail/PathRequest.h @@ -154,7 +154,7 @@ class PathRequest final : public InfoSubRequest, std::chrono::steady_clock::time_point quick_reply_; std::chrono::steady_clock::time_point full_reply_; - // payments accept up to 6 paths - account for fullLiquidityPath can be appended + // payments accept up to 6 paths - account for +1 fullLiquidityPath can be appended static unsigned int const max_paths_ = 5; }; From 01fb4cbd2dd8f5435fabed27ca9dc5e76e148e63 Mon Sep 17 00:00:00 2001 From: shortthefomo Date: Thu, 12 Mar 2026 14:37:00 -0300 Subject: [PATCH 18/22] address test issues --- src/test/app/Path_test.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index 160fdd21bdd..7928a03401b 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -715,17 +715,24 @@ class Path_test : public beast::unit_test::suite auto const result = six_path_append_request_result(); BEAST_EXPECT(result.isMember(jss::alternatives)); - if (!result.isMember(jss::alternatives) || !result[jss::alternatives].isArray()) + if (!result.isMember(jss::alternatives)) return; + BEAST_EXPECT(result[jss::alternatives].isArray()); + if (!result[jss::alternatives].isArray()) + return; + + bool sawPathsComputed = false; for (auto const& alt : result[jss::alternatives]) { if (!alt.isMember(jss::paths_computed)) continue; + sawPathsComputed = true; BEAST_EXPECT(alt[jss::paths_computed].isArray()); if (alt[jss::paths_computed].isArray()) BEAST_EXPECT(alt[jss::paths_computed].size() <= 6); } + BEAST_EXPECT(sawPathsComputed); } void From 9b399b47c51f2a7b42270eb36ab747d22f1fec92 Mon Sep 17 00:00:00 2001 From: shortthefomo <508629+shortthefomo@users.noreply.github.com> Date: Thu, 26 Mar 2026 01:42:02 -0300 Subject: [PATCH 19/22] upstream refactoring fix includes --- src/test/app/Path_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index 7928a03401b..f63b35cb0b6 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -4,8 +4,8 @@ #include #include -#include -#include +#include +#include #include #include From 630fa6b9389d45096849ba46f09fd9071ef7a02b Mon Sep 17 00:00:00 2001 From: shortthefomo <508629+shortthefomo@users.noreply.github.com> Date: Fri, 27 Mar 2026 17:55:21 -0300 Subject: [PATCH 20/22] fix build errors due to upstream changes --- src/test/app/Path_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index f63b35cb0b6..c11c374101d 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -787,7 +787,7 @@ class Path_test : public beast::unit_test::suite env.close(); auto cache = - std::make_shared(env.current(), env.app().journal("RippleLineCache")); + std::make_shared(env.current(), env.app().getJournal("RippleLineCache")); Pathfinder pf( cache, A1.id(), From efb42e0eca184ea1771f19cbfae848dd271931f0 Mon Sep 17 00:00:00 2001 From: shortthefomo <508629+shortthefomo@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:22:49 -0400 Subject: [PATCH 21/22] fix: rename RippleLineCache to AssetCache to match upstream --- src/test/app/Path_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index c11c374101d..de317b97ed9 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include @@ -787,7 +787,7 @@ class Path_test : public beast::unit_test::suite env.close(); auto cache = - std::make_shared(env.current(), env.app().getJournal("RippleLineCache")); + std::make_shared(env.current(), env.app().getJournal("AssetCache")); Pathfinder pf( cache, A1.id(), From 1c52832fcad967d44ccacd6d5c07001853d7340b Mon Sep 17 00:00:00 2001 From: shortthefomo <508629+shortthefomo@users.noreply.github.com> Date: Tue, 19 May 2026 06:03:12 -0400 Subject: [PATCH 22/22] refactor: Align identifier naming with develop --- src/test/app/Path_test.cpp | 172 ++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index 37908354982..ac1d7154716 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -687,65 +687,65 @@ class Path_test : public beast::unit_test::suite BEAST_EXPECT(equal(sa, Account("alice")["USD"](5))); } - Json::Value - six_path_append_request_result() + json::Value + sixPathAppendRequestResult() { using namespace jtx; Env env = pathTestEnv(); - Account A1{"A1"}; - Account A2{"A2"}; - Account G1{"G1"}; - Account G2{"G2"}; - Account M1{"M1"}; - Account M2{"M2"}; - Account M3{"M3"}; - Account M4{"M4"}; - Account M5{"M5"}; - Account M6{"M6"}; - Account MM{"MM"}; - - env.fund(XRP(1000), A1, A2, G1, G2, M1, M2, M3, M4, M5, M6, MM); + Account const a1{"A1"}; + Account const a2{"A2"}; + Account const g1{"G1"}; + Account const g2{"G2"}; + Account const m1{"M1"}; + Account const m2{"M2"}; + Account const m3{"M3"}; + Account const m4{"M4"}; + Account const m5{"M5"}; + Account const m6{"M6"}; + Account const mm{"MM"}; + + env.fund(XRP(1000), a1, a2, g1, g2, m1, m2, m3, m4, m5, m6, mm); env.close(); - env.trust(G1["HKD"](2000), A1); - env.trust(G2["HKD"](2000), A2); + env.trust(g1["HKD"](2000), a1); + env.trust(g2["HKD"](2000), a2); - env.trust(G1["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); - env.trust(G2["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.trust(g1["HKD"](100000), m1, m2, m3, m4, m5, m6, mm); + env.trust(g2["HKD"](100000), m1, m2, m3, m4, m5, m6, mm); env.close(); - env(pay(G1, A1, G1["HKD"](1000))); - - env(pay(G1, M1, G1["HKD"](10))); - env(pay(G1, M2, G1["HKD"](10))); - env(pay(G1, M3, G1["HKD"](10))); - env(pay(G1, M4, G1["HKD"](10))); - env(pay(G1, M5, G1["HKD"](10))); - env(pay(G1, M6, G1["HKD"](10))); - env(pay(G1, MM, G1["HKD"](1000))); - - env(pay(G2, M1, G2["HKD"](10))); - env(pay(G2, M2, G2["HKD"](10))); - env(pay(G2, M3, G2["HKD"](10))); - env(pay(G2, M4, G2["HKD"](10))); - env(pay(G2, M5, G2["HKD"](10))); - env(pay(G2, M6, G2["HKD"](10))); - env(pay(G2, MM, G2["HKD"](1000))); + env(pay(g1, a1, g1["HKD"](1000))); + + env(pay(g1, m1, g1["HKD"](10))); + env(pay(g1, m2, g1["HKD"](10))); + env(pay(g1, m3, g1["HKD"](10))); + env(pay(g1, m4, g1["HKD"](10))); + env(pay(g1, m5, g1["HKD"](10))); + env(pay(g1, m6, g1["HKD"](10))); + env(pay(g1, mm, g1["HKD"](1000))); + + env(pay(g2, m1, g2["HKD"](10))); + env(pay(g2, m2, g2["HKD"](10))); + env(pay(g2, m3, g2["HKD"](10))); + env(pay(g2, m4, g2["HKD"](10))); + env(pay(g2, m5, g2["HKD"](10))); + env(pay(g2, m6, g2["HKD"](10))); + env(pay(g2, mm, g2["HKD"](1000))); env.close(); - env(offer(MM, G1["HKD"](1000), G2["HKD"](100))); + env(offer(mm, g1["HKD"](1000), g2["HKD"](100))); env.close(); - return find_paths_request(env, A1, A2, A2["HKD"](60), std::nullopt, G1["HKD"].currency); + return findPathsRequest(env, a1, a2, a2["HKD"](60), std::nullopt, g1["HKD"].currency); } void - pathfind_paths_computed_never_exceeds_six() + pathfindPathsComputedNeverExceedsSix() { testcase("pathfind paths_computed never exceeds six"); - auto const result = six_path_append_request_result(); + auto const result = sixPathAppendRequestResult(); BEAST_EXPECT(result.isMember(jss::alternatives)); if (!result.isMember(jss::alternatives)) return; @@ -768,65 +768,65 @@ class Path_test : public beast::unit_test::suite } void - pathfind_can_return_six_paths_with_append() + pathfindCanReturnSixPathsWithAppend() { testcase("pathfind can return six paths with append"); using namespace jtx; Env env = pathTestEnv(); - Account A1{"A1"}; - Account A2{"A2"}; - Account G1{"G1"}; - Account G2{"G2"}; - Account M1{"M1"}; - Account M2{"M2"}; - Account M3{"M3"}; - Account M4{"M4"}; - Account M5{"M5"}; - Account M6{"M6"}; - Account MM{"MM"}; - - env.fund(XRP(1000), A1, A2, G1, G2, M1, M2, M3, M4, M5, M6, MM); + Account const a1{"A1"}; + Account const a2{"A2"}; + Account const g1{"G1"}; + Account const g2{"G2"}; + Account const m1{"M1"}; + Account const m2{"M2"}; + Account const m3{"M3"}; + Account const m4{"M4"}; + Account const m5{"M5"}; + Account const m6{"M6"}; + Account const mm{"MM"}; + + env.fund(XRP(1000), a1, a2, g1, g2, m1, m2, m3, m4, m5, m6, mm); env.close(); - env.trust(G1["HKD"](2000), A1); - env.trust(G2["HKD"](2000), A2); + env.trust(g1["HKD"](2000), a1); + env.trust(g2["HKD"](2000), a2); - env.trust(G1["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); - env.trust(G2["HKD"](100000), M1, M2, M3, M4, M5, M6, MM); + env.trust(g1["HKD"](100000), m1, m2, m3, m4, m5, m6, mm); + env.trust(g2["HKD"](100000), m1, m2, m3, m4, m5, m6, mm); env.close(); - env(pay(G1, A1, G1["HKD"](1000))); - - env(pay(G1, M1, G1["HKD"](10))); - env(pay(G1, M2, G1["HKD"](10))); - env(pay(G1, M3, G1["HKD"](10))); - env(pay(G1, M4, G1["HKD"](10))); - env(pay(G1, M5, G1["HKD"](10))); - env(pay(G1, M6, G1["HKD"](10))); - env(pay(G1, MM, G1["HKD"](1000))); - - env(pay(G2, M1, G2["HKD"](10))); - env(pay(G2, M2, G2["HKD"](10))); - env(pay(G2, M3, G2["HKD"](10))); - env(pay(G2, M4, G2["HKD"](10))); - env(pay(G2, M5, G2["HKD"](10))); - env(pay(G2, M6, G2["HKD"](10))); - env(pay(G2, MM, G2["HKD"](1000))); + env(pay(g1, a1, g1["HKD"](1000))); + + env(pay(g1, m1, g1["HKD"](10))); + env(pay(g1, m2, g1["HKD"](10))); + env(pay(g1, m3, g1["HKD"](10))); + env(pay(g1, m4, g1["HKD"](10))); + env(pay(g1, m5, g1["HKD"](10))); + env(pay(g1, m6, g1["HKD"](10))); + env(pay(g1, mm, g1["HKD"](1000))); + + env(pay(g2, m1, g2["HKD"](10))); + env(pay(g2, m2, g2["HKD"](10))); + env(pay(g2, m3, g2["HKD"](10))); + env(pay(g2, m4, g2["HKD"](10))); + env(pay(g2, m5, g2["HKD"](10))); + env(pay(g2, m6, g2["HKD"](10))); + env(pay(g2, mm, g2["HKD"](1000))); env.close(); - env(offer(MM, G1["HKD"](1000), G2["HKD"](100))); + env(offer(mm, g1["HKD"](1000), g2["HKD"](100))); env.close(); auto cache = std::make_shared(env.current(), env.app().getJournal("AssetCache")); Pathfinder pf( cache, - A1.id(), - A2.id(), - G1["HKD"].currency, + a1.id(), + a2.id(), + g1["HKD"].currency, std::nullopt, - A2["HKD"](60), + a2["HKD"](60), std::nullopt, std::nullopt, env.app()); @@ -835,12 +835,12 @@ class Path_test : public beast::unit_test::suite pf.computePathRanks(5); STPath fullLiquidityPath; - auto bestPaths = pf.getBestPaths(5, fullLiquidityPath, STPathSet{}, A1.id()); + auto bestPaths = pf.getBestPaths(5, fullLiquidityPath, STPathSet{}, a1.id()); BEAST_EXPECT(bestPaths.size() == 5); BEAST_EXPECT(!fullLiquidityPath.empty()); if (!fullLiquidityPath.empty()) - bestPaths.push_back(fullLiquidityPath); + bestPaths.pushBack(fullLiquidityPath); BEAST_EXPECT(bestPaths.size() == 6); } @@ -2064,10 +2064,10 @@ class Path_test : public beast::unit_test::suite path_find_06(domainEnabled); } - hybrid_offer_path(); - amm_domain_path(); - pathfind_paths_computed_never_exceeds_six(); - pathfind_can_return_six_paths_with_append(); + hybridOfferPath(); + ammDomainPath(); + pathfindPathsComputedNeverExceedsSix(); + pathfindCanReturnSixPathsWithAppend(); } };