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:
seelabs
2017-02-08 13:24:36 -05:00
committed by Scott Schurr
parent 80d9b0464a
commit 846723d771
27 changed files with 2172 additions and 646 deletions

View File

@@ -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});
}
};