CatapultServer  v0.5.0.1 (Elephant)
TransactionFeeMaximizer.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/functions.h"
24 #include "catapult/types.h"
25 
26 namespace catapult { namespace harvesting {
27 
29  struct FeePolicy {
31  uint32_t NumTransactions = 0;
32 
35 
38  };
39 
42  public:
44  const FeePolicy& best() const;
45 
46  public:
48  void apply(const model::TransactionInfo& transactionInfo);
49 
50  private:
53  };
54 }}
catapult::harvesting::FeePolicy::NumTransactions
uint32_t NumTransactions
Number of transactions.
Definition: TransactionFeeMaximizer.h:31
catapult::harvesting::TransactionFeeMaximizer::apply
void apply(const model::TransactionInfo &transactionInfo)
Applies transactionInfo to the maximizer to include in the best fee policy calculation.
Definition: TransactionFeeMaximizer.cpp:36
catapult::harvesting::FeePolicy::FeeMultiplier
BlockFeeMultiplier FeeMultiplier
Fee multiplier.
Definition: TransactionFeeMaximizer.h:34
catapult::Amount
utils::BaseValue< uint64_t, Amount_tag > Amount
Definition: src/catapult/types.h:76
catapult::harvesting::TransactionFeeMaximizer::m_best
FeePolicy m_best
Definition: TransactionFeeMaximizer.h:52
TransactionFeeMaximizer.h
catapult::observers::DEFINE_OBSERVER
DEFINE_OBSERVER(AccountAddress, model::AccountAddressNotification, [](const auto &notification, const auto &context) { DefaultAccountVisitor visitor(context);visitor.visit(notification.Address);})
functions.h
catapult::model::TransactionInfo
A transaction and its associated metadata.
Definition: EntityInfo.h:104
catapult::utils::BaseValue< uint32_t, BlockFeeMultiplier_tag >
Observers.h
catapult::harvesting::TransactionFeeMaximizer::best
const FeePolicy & best() const
Gets the best fee policy identified.
Definition: TransactionFeeMaximizer.cpp:32
catapult::model::CalculateTransactionMaxFeeMultiplier
BlockFeeMultiplier CalculateTransactionMaxFeeMultiplier(const Transaction &transaction)
Calculates the maximum fee multiplier for transaction.
Definition: FeeUtils.cpp:30
EntityInfo.h
catapult::BlockFeeMultiplier
utils::BaseValue< uint32_t, BlockFeeMultiplier_tag > BlockFeeMultiplier
Definition: src/catapult/types.h:91
catapult::harvesting::TransactionFeeMaximizer::m_current
FeePolicy m_current
Definition: TransactionFeeMaximizer.h:51
FeeUtils.h
types.h
catapult::importance::UpdateActivity
void UpdateActivity(const Key &publicKey, const observers::ObserverContext &context, const ActivityBucketConsumer &commitAction, const ActivityBucketConsumer &rollbackAction)
Definition: ActivityObserverUtils.cpp:36
CATAPULT_THROW_INVALID_ARGUMENT
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
catapult::model::EntityInfo::pEntity
std::shared_ptr< TEntity > pEntity
Entity pointer.
Definition: EntityInfo.h:45
catapult
Definition: AddressExtractionExtension.cpp:28
ActivityObserverUtils.h
catapult::harvesting::FeePolicy::BaseFee
Amount BaseFee
Base fee.
Definition: TransactionFeeMaximizer.h:37
catapult::model::CalculateTransactionFee
Amount CalculateTransactionFee(BlockFeeMultiplier feeMultiplier, const Transaction &transaction)
Calculates the fee for transaction contained in block with feeMultiplier.
Definition: FeeUtils.cpp:26
catapult::harvesting::TransactionFeeMaximizer
Maximizes fees given a stream of transaction infos.
Definition: TransactionFeeMaximizer.h:41
catapult::harvesting::FeePolicy
Information about a fee policy.
Definition: TransactionFeeMaximizer.h:29