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

@@ -117,6 +117,8 @@ public:
hash_value_ = get_hash (*this);
}
STPathElement(STPathElement const&) = default;
int
getNodeType () const
{
@@ -203,8 +205,8 @@ class STPath
public:
STPath () = default;
STPath (std::vector<STPathElement> const& p)
: mPath (p)
STPath (std::vector<STPathElement> p)
: mPath (std::move(p))
{ }
std::vector<STPathElement>::size_type
@@ -279,6 +281,10 @@ public:
return mPath[i];
}
void reserve(size_t s)
{
mPath.reserve(s);
}
private:
std::vector<STPathElement> mPath;
};