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