rippled
Loading...
Searching...
No Matches
protocol/Fees.h
1#ifndef XRPL_PROTOCOL_FEES_H_INCLUDED
2#define XRPL_PROTOCOL_FEES_H_INCLUDED
3
4#include <xrpl/protocol/XRPAmount.h>
5
6namespace ripple {
7
13struct Fees
14{
15 XRPAmount base{0}; // Reference tx cost (drops)
16 XRPAmount reserve{0}; // Reserve base (drops)
17 XRPAmount increment{0}; // Reserve increment (drops)
18
19 explicit Fees() = default;
20 Fees(Fees const&) = default;
21 Fees&
22 operator=(Fees const&) = default;
23
30 accountReserve(std::size_t ownerCount) const
31 {
32 return reserve + ownerCount * increment;
33 }
34};
35
36} // namespace ripple
37
38#endif
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
Reflects the fee settings for a particular ledger.
Fees & operator=(Fees const &)=default
Fees(Fees const &)=default
XRPAmount base
XRPAmount increment
XRPAmount reserve
Fees()=default
XRPAmount accountReserve(std::size_t ownerCount) const
Returns the account reserve given the owner count, in drops.