|
rippled
|
Calculates payment paths. More...


Classes | |
| struct | PathRank |
Public Types | |
| enum | NodeType { nt_SOURCE, nt_ACCOUNTS, nt_BOOKS, nt_XRP_BOOK, nt_DEST_BOOK, nt_DESTINATION } |
| enum | PaymentType { pt_XRP_to_XRP, pt_XRP_to_nonXRP, pt_nonXRP_to_XRP, pt_nonXRP_to_same, pt_nonXRP_to_nonXRP } |
| using | PathType = std::vector< NodeType > |
Public Member Functions | |
| Pathfinder (std::shared_ptr< RippleLineCache > const &cache, AccountID const &srcAccount, AccountID const &dstAccount, Currency const &uSrcCurrency, std::optional< AccountID > const &uSrcIssuer, STAmount const &dstAmount, std::optional< STAmount > const &srcAmount, Application &app) | |
| Construct a pathfinder without an issuer. More... | |
| Pathfinder (Pathfinder const &)=delete | |
| Pathfinder & | operator= (Pathfinder const &)=delete |
| ~Pathfinder ()=default | |
| bool | findPaths (int searchLevel, std::function< bool(void)> const &continueCallback={}) |
| void | computePathRanks (int maxPaths, std::function< bool(void)> const &continueCallback={}) |
| Compute the rankings of the paths. More... | |
| STPathSet | getBestPaths (int maxPaths, STPath &fullLiquidityPath, STPathSet const &extraPaths, AccountID const &srcIssuer, std::function< bool(void)> const &continueCallback={}) |
Static Public Member Functions | |
| static void | initPathTable () |
Private Member Functions | |
| STPathSet & | addPathsForType (PathType const &type, std::function< bool(void)> const &continueCallback) |
| bool | issueMatchesOrigin (Issue const &) |
| int | getPathsOut (Currency const ¤cy, AccountID const &account, LineDirection direction, bool isDestCurrency, AccountID const &dest, std::function< bool(void)> const &continueCallback) |
| void | addLink (STPath const ¤tPath, STPathSet &incompletePaths, int addFlags, std::function< bool(void)> const &continueCallback) |
| void | addLinks (STPathSet const ¤tPaths, STPathSet &incompletePaths, int addFlags, std::function< bool(void)> const &continueCallback) |
| TER | getPathLiquidity (STPath const &path, STAmount const &minDstAmount, STAmount &amountOut, uint64_t &qualityOut) const |
| bool | isNoRippleOut (STPath const ¤tPath) |
| bool | isNoRipple (AccountID const &fromAccount, AccountID const &toAccount, Currency const ¤cy) |
| void | rankPaths (int maxPaths, STPathSet const &paths, std::vector< PathRank > &rankedPaths, std::function< bool(void)> const &continueCallback) |
Static Private Member Functions | |
| static auto & | getCounter () noexcept |
Private Attributes | |
| AccountID | mSrcAccount |
| AccountID | mDstAccount |
| AccountID | mEffectiveDst |
| STAmount | mDstAmount |
| Currency | mSrcCurrency |
| std::optional< AccountID > | mSrcIssuer |
| STAmount | mSrcAmount |
| STAmount | mRemainingAmount |
| The amount remaining from mSrcAccount after the default liquidity has been removed. More... | |
| bool | convert_all_ |
| std::shared_ptr< ReadView const > | mLedger |
| std::unique_ptr< LoadEvent > | m_loadEvent |
| std::shared_ptr< RippleLineCache > | mRLCache |
| STPathElement | mSource |
| STPathSet | mCompletePaths |
| std::vector< PathRank > | mPathRanks |
| std::map< PathType, STPathSet > | mPaths |
| hash_map< Issue, int > | mPathsOutCountMap |
| Application & | app_ |
| const beast::Journal | j_ |
Static Private Attributes | |
| static const std::uint32_t | afADD_ACCOUNTS = 0x001 |
| static const std::uint32_t | afADD_BOOKS = 0x002 |
| static const std::uint32_t | afOB_XRP = 0x010 |
| static const std::uint32_t | afOB_LAST = 0x040 |
| static const std::uint32_t | afAC_LAST = 0x080 |
Calculates payment paths.
The RippleCalc determines the quality of the found paths.
Definition at line 38 of file Pathfinder.h.
Definition at line 93 of file Pathfinder.h.
| Enumerator | |
|---|---|
| nt_SOURCE | |
| nt_ACCOUNTS | |
| nt_BOOKS | |
| nt_XRP_BOOK | |
| nt_DEST_BOOK | |
| nt_DESTINATION | |
Definition at line 83 of file Pathfinder.h.
| Enumerator | |
|---|---|
| pt_XRP_to_XRP | |
| pt_XRP_to_nonXRP | |
| pt_nonXRP_to_XRP | |
| pt_nonXRP_to_same | |
| pt_nonXRP_to_nonXRP | |
Definition at line 97 of file Pathfinder.h.
| ripple::Pathfinder::Pathfinder | ( | std::shared_ptr< RippleLineCache > const & | cache, |
| AccountID const & | srcAccount, | ||
| AccountID const & | dstAccount, | ||
| Currency const & | uSrcCurrency, | ||
| std::optional< AccountID > const & | uSrcIssuer, | ||
| STAmount const & | dstAmount, | ||
| std::optional< STAmount > const & | srcAmount, | ||
| Application & | app | ||
| ) |
Construct a pathfinder without an issuer.
Definition at line 161 of file Pathfinder.cpp.
|
delete |
|
default |
|
delete |
|
static |
Definition at line 1300 of file Pathfinder.cpp.
| bool ripple::Pathfinder::findPaths | ( | int | searchLevel, |
| std::function< bool(void)> const & | continueCallback = {} |
||
| ) |
Definition at line 195 of file Pathfinder.cpp.
| void ripple::Pathfinder::computePathRanks | ( | int | maxPaths, |
| std::function< bool(void)> const & | continueCallback = {} |
||
| ) |
Compute the rankings of the paths.
Definition at line 411 of file Pathfinder.cpp.
| STPathSet ripple::Pathfinder::getBestPaths | ( | int | maxPaths, |
| STPath & | fullLiquidityPath, | ||
| STPathSet const & | extraPaths, | ||
| AccountID const & | srcIssuer, | ||
| std::function< bool(void)> const & | continueCallback = {} |
||
| ) |
Definition at line 567 of file Pathfinder.cpp.
|
private |
Definition at line 795 of file Pathfinder.cpp.
|
private |
Definition at line 697 of file Pathfinder.cpp.
|
private |
Definition at line 708 of file Pathfinder.cpp.
|
private |
Definition at line 937 of file Pathfinder.cpp.
|
private |
Definition at line 778 of file Pathfinder.cpp.
|
private |
Definition at line 344 of file Pathfinder.cpp.
|
private |
Definition at line 902 of file Pathfinder.cpp.
|
private |
Definition at line 885 of file Pathfinder.cpp.
|
private |
Definition at line 489 of file Pathfinder.cpp.
|
staticprivatenoexceptinherited |
Definition at line 128 of file CountedObject.h.
|
private |
Definition at line 196 of file Pathfinder.h.
|
private |
Definition at line 197 of file Pathfinder.h.
|
private |
Definition at line 198 of file Pathfinder.h.
|
private |
Definition at line 199 of file Pathfinder.h.
|
private |
Definition at line 200 of file Pathfinder.h.
|
private |
Definition at line 201 of file Pathfinder.h.
|
private |
Definition at line 202 of file Pathfinder.h.
|
private |
The amount remaining from mSrcAccount after the default liquidity has been removed.
Definition at line 205 of file Pathfinder.h.
|
private |
Definition at line 206 of file Pathfinder.h.
|
private |
Definition at line 208 of file Pathfinder.h.
|
private |
Definition at line 209 of file Pathfinder.h.
|
private |
Definition at line 210 of file Pathfinder.h.
|
private |
Definition at line 212 of file Pathfinder.h.
|
private |
Definition at line 213 of file Pathfinder.h.
|
private |
Definition at line 214 of file Pathfinder.h.
Definition at line 215 of file Pathfinder.h.
Definition at line 217 of file Pathfinder.h.
|
private |
Definition at line 219 of file Pathfinder.h.
|
private |
Definition at line 220 of file Pathfinder.h.
|
staticprivate |
Definition at line 223 of file Pathfinder.h.
|
staticprivate |
Definition at line 226 of file Pathfinder.h.
|
staticprivate |
Definition at line 229 of file Pathfinder.h.
|
staticprivate |
Definition at line 232 of file Pathfinder.h.
|
staticprivate |
Definition at line 235 of file Pathfinder.h.
1.8.17