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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user