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 xrpl {
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 xrpl
33
34#endif
static constexpr std::uint64_t cMaxValue
Definition STAmount.h:52
Issue const & issue() const
Definition STAmount.h:488
static int const cMaxOffset
Definition STAmount.h:47
bool native() const noexcept
Definition STAmount.h:450
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)
STAmount largestAmount(STAmount const &amt)
bool convertAllCheck(STAmount const &a)
constexpr XRPAmount INITIAL_XRP
Configure the native currency.