mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
New rules for payment paths:
* Sanity check on newly created strands * Better loop detection * Better tests (test every combination of path element pairs) * Disallow any root issuer (even for xrp) * Disallow compount element typs in path * Issue was not reset when currency was XRP * Add amendment
This commit is contained in:
@@ -46,13 +46,13 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
return jv;
|
||||
}
|
||||
|
||||
void testAuth()
|
||||
void testAuth(std::initializer_list<uint256> fs)
|
||||
{
|
||||
using namespace jtx;
|
||||
auto const gw = Account("gw");
|
||||
auto const USD = gw["USD"];
|
||||
{
|
||||
Env env(*this);
|
||||
Env env(*this, features(fs));
|
||||
env.fund(XRP(100000), "alice", gw);
|
||||
env(fset(gw, asfRequireAuth));
|
||||
env(auth(gw, "alice", "USD"), ter(tecNO_LINE_REDUNDANT));
|
||||
@@ -75,7 +75,9 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
|
||||
void run() override
|
||||
{
|
||||
testAuth();
|
||||
testAuth({});
|
||||
testAuth({featureFlow});
|
||||
testAuth({featureFlow, featureToStrandV2});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user