rippled
Loading...
Searching...
No Matches
protocol/Fees.h
1#pragma once
2
3#include <xrpl/protocol/XRPAmount.h>
4
5namespace xrpl {
6
7// Deprecated constant for backwards compatibility with pre-XRPFees amendment.
8// This was the reference fee units used in the old fee calculation.
9inline constexpr std::uint32_t FEE_UNITS_DEPRECATED = 10;
10
16struct Fees
17{
20
23
26
27 explicit Fees() = default;
28 Fees(Fees const&) = default;
29 Fees&
30 operator=(Fees const&) = default;
31
32 Fees(XRPAmount base_, XRPAmount reserve_, XRPAmount increment_)
33 : base(base_), reserve(reserve_), increment(increment_)
34 {
35 }
36
43 accountReserve(std::size_t ownerCount) const
44 {
45 return reserve + ownerCount * increment;
46 }
47};
48
49} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
constexpr std::uint32_t FEE_UNITS_DEPRECATED
Reflects the fee settings for a particular ledger.
Fees(Fees const &)=default
Fees(XRPAmount base_, XRPAmount reserve_, XRPAmount increment_)
XRPAmount accountReserve(std::size_t ownerCount) const
Returns the account reserve given the owner count, in drops.
XRPAmount reserve
Minimum XRP an account must hold to exist on the ledger.
Fees()=default
XRPAmount increment
Additional XRP reserve required per owned ledger object.
XRPAmount base
Cost of a reference transaction in drops.
Fees & operator=(Fees const &)=default