rippled
Loading...
Searching...
No Matches
PathfinderUtils.h
1#pragma once
2
3#include <xrpl/protocol/STAmount.h>
4
5namespace xrpl {
6
7inline STAmount
9{
10 if (amt.native())
11 return INITIAL_XRP;
12
14}
15
16inline STAmount
17convertAmount(STAmount const& amt, bool all)
18{
19 if (!all)
20 return amt;
21
22 return largestAmount(amt);
23};
24
25inline bool
27{
28 return a == largestAmount(a);
29}
30
31} // namespace xrpl
static constexpr std::uint64_t cMaxValue
Definition STAmount.h:51
Issue const & issue() const
Definition STAmount.h:454
static int const cMaxOffset
Definition STAmount.h:46
bool native() const noexcept
Definition STAmount.h:416
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
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.