Don't load trust lines that can't participate in path finding

* "A path is considered invalid if and only if it enters and exits an
  address node through trust lines where No Ripple has been enabled for
  that address." (https://xrpl.org/rippling.html#specifics)
* When loading trust lines for an account "Alice" which was reached
  via a trust line that has the No Ripple flag set on Alice's side, do
  not use or cache any of Alice's trust lines which have the No Ripple
  flag set on Alice's side. For typical "end-user" accounts, this will
  return no trust lines.
This commit is contained in:
Ed Hennis
2022-02-09 19:31:22 -05:00
committed by manojsdoshi
parent aa4a5b7fe9
commit e836375d99
9 changed files with 53 additions and 17 deletions

View File

@@ -43,6 +43,12 @@ class AmendmentBlocked_test : public beast::unit_test::suite
Account const ali{"ali", KeyType::secp256k1};
env.fund(XRP(10000), alice, bob, gw);
env.memoize(ali);
// This close() ensures that all the accounts get created and their
// default ripple flag gets set before the trust lines are created.
// Without it, the ordering manages to create alice's trust line with
// noRipple set on gw's end. The existing tests pass either way, but
// better to do it right.
env.close();
env.trust(USD(600), alice);
env.trust(USD(700), bob);
env(pay(gw, alice, USD(70)));