CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace model {
43 std::pair<Amount, bool>
sumAll()
const;
void add(Height height, Amount amount)
Adds inflation of amount starting at height.
Definition: InflationCalculator.cpp:90
std::pair< Amount, bool > sumAll() const
Calculates the total inflation.
Definition: InflationCalculator.cpp:69
utils::BaseValue< uint64_t, Amount_tag > Amount
Definition: src/catapult/types.h:76
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
Calculator for calculating the inflation at a given height and the total inflation up to a given heig...
Definition: InflationCalculator.h:28
constexpr ValueType unwrap() const
Unwraps this value and returns the underlying raw value.
Definition: BaseValue.h:53
Immutable wrapper for basic types, to provide some type-safety.
Definition: BaseValue.h:100
Amount getCumulativeAmount(Height height) const
Gets the total inflation amount up to (but not including) height.
Definition: InflationCalculator.cpp:47
bool contains(Height height, Amount amount) const
Returns true if the inflation map contains entry with height and amount.
Definition: InflationCalculator.cpp:30
Amount getSpotAmount(Height height) const
Gets the inflation amount at height.
Definition: InflationCalculator.cpp:35
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
std::map< Height, Amount > m_inflationMap
Definition: InflationCalculator.h:50
Definition: AddressExtractionExtension.cpp:28
size_t size() const
Gets the number of inflation entries.
Definition: InflationCalculator.cpp:26