rippled
Loading...
Searching...
No Matches
PathfinderUtils.h
1#ifndef XRPL_PATH_IMPL_PATHFINDERUTILS_H_INCLUDED
2#define XRPL_PATH_IMPL_PATHFINDERUTILS_H_INCLUDED
3
4#include <xrpl/protocol/STAmount.h>
5
6namespace ripple {
7
8inline STAmount
10{
11 if (amt.native())
12 return INITIAL_XRP;
13
15}
16
17inline STAmount
18convertAmount(STAmount const& amt, bool all)
19{
20 if (!all)
21 return amt;
22
23 return largestAmount(amt);
24};
25
26inline bool
28{
29 return a == largestAmount(a);
30}
31
32} // namespace ripple
33
34#endif
static int const cMaxOffset
Definition STAmount.h:47
static std::uint64_t const cMaxValue
Definition STAmount.h:51
Issue const & issue() const
Definition STAmount.h:477
bool native() const noexcept
Definition STAmount.h:439
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
STAmount convertAmount(STAmount const &amt, bool all)
bool convertAllCheck(STAmount const &a)
constexpr XRPAmount INITIAL_XRP
Configure the native currency.
STAmount largestAmount(STAmount const &amt)