mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +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:
@@ -24,6 +24,7 @@
|
||||
#include <ripple/beast/unit_test.h>
|
||||
#include <ripple/beast/core/LexicalCast.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/protocol/Feature.h>
|
||||
#include <ripple/protocol/SField.h>
|
||||
|
||||
namespace ripple {
|
||||
@@ -36,11 +37,11 @@ class Discrepancy_test : public beast::unit_test::suite
|
||||
// A payment with path and sendmax is made and the transaction is queried
|
||||
// to verify that the net of balance changes match the fee charged.
|
||||
void
|
||||
testXRPDiscrepancy ()
|
||||
testXRPDiscrepancy (std::initializer_list<uint256> fs)
|
||||
{
|
||||
testcase ("Discrepancy test : XRP Discrepancy");
|
||||
using namespace test::jtx;
|
||||
Env env {*this};
|
||||
Env env {*this, features(fs)};
|
||||
|
||||
Account A1 {"A1"};
|
||||
Account A2 {"A2"};
|
||||
@@ -143,7 +144,9 @@ class Discrepancy_test : public beast::unit_test::suite
|
||||
public:
|
||||
void run ()
|
||||
{
|
||||
testXRPDiscrepancy ();
|
||||
testXRPDiscrepancy ({});
|
||||
testXRPDiscrepancy ({featureFlow});
|
||||
testXRPDiscrepancy ({featureFlow, featureToStrandV2});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user