CatapultServer  v0.5.0.1 (Elephant)
TransactionsInfoSupplier.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult {
26  namespace cache { class MemoryUtCache; }
27  namespace harvesting { class HarvestingUtFacade; }
28 }
29 
30 namespace catapult { namespace harvesting {
31 
36 
39 
41  std::vector<Hash256> TransactionHashes;
42 
45  };
46 
48  using TransactionsInfoSupplier = std::function<TransactionsInfo (HarvestingUtFacade&, uint32_t)>;
49 
53  const cache::MemoryUtCache& utCache);
54 }}
catapult::model::CalculateBlockTransactionsHash
void CalculateBlockTransactionsHash(const std::vector< const TransactionInfo * > &transactionInfos, Hash256 &blockTransactionsHash)
Calculates the block transactions hash of transactionInfos into blockTransactionsHash.
Definition: BlockUtils.cpp:42
catapult::harvesting::@39::SortDirection
SortDirection
Definition: TransactionsInfoSupplier.cpp:33
TransactionFeeMaximizer.h
catapult::model::TransactionSelectionStrategy::Maximize_Fee
Choose transactions with highest fees.
catapult::model::Transactions
std::vector< std::shared_ptr< const Transaction > > Transactions
Container of transactions.
Definition: BlockUtils.h:71
catapult::model::TransactionSelectionStrategy::Minimize_Fee
Choose transactions with lowest fees.
TransactionSelectionStrategy.h
catapult::model::TransactionInfo
A transaction and its associated metadata.
Definition: EntityInfo.h:104
catapult::utils::BaseValue< uint32_t, BlockFeeMultiplier_tag >
catapult::harvesting::TransactionsInfo::Transactions
model::Transactions Transactions
Transactions (shared pointers) (ordered).
Definition: TransactionsInfoSupplier.h:38
catapult::model::CalculateTransactionMaxFeeMultiplier
BlockFeeMultiplier CalculateTransactionMaxFeeMultiplier(const Transaction &transaction)
Calculates the maximum fee multiplier for transaction.
Definition: FeeUtils.cpp:30
TransactionsInfoSupplier.h
catapult::harvesting::TransactionsInfoSupplier
std::function< TransactionsInfo(HarvestingUtFacade &, uint32_t)> TransactionsInfoSupplier
Supplies a transactions info composed of a maximum number of transactions for a block given a harvest...
Definition: TransactionsInfoSupplier.h:48
catapult::harvesting::TransactionsInfo::TransactionsHash
Hash256 TransactionsHash
Aggregate transactions hash.
Definition: TransactionsInfoSupplier.h:44
MemoryUtCache.h
catapult::harvesting::TransactionsInfo
Information about transactions.
Definition: TransactionsInfoSupplier.h:33
MemoryUtCacheUtils.h
catapult::BlockFeeMultiplier
utils::BaseValue< uint32_t, BlockFeeMultiplier_tag > BlockFeeMultiplier
Definition: src/catapult/types.h:91
catapult::harvesting::CreateTransactionsInfoSupplier
TransactionsInfoSupplier CreateTransactionsInfoSupplier(model::TransactionSelectionStrategy strategy, const cache::MemoryUtCache &utCache)
Creates a default transactions info supplier aroundutCache for specified transaction strategy.
Definition: TransactionsInfoSupplier.cpp:117
catapult::harvesting::TransactionsInfo::FeeMultiplier
BlockFeeMultiplier FeeMultiplier
Optimal fee multiplier.
Definition: TransactionsInfoSupplier.h:35
HarvestingUtFacadeFactory.h
catapult::model::TransactionSelectionStrategy
TransactionSelectionStrategy
Strategy for selecting transactions.
Definition: TransactionSelectionStrategy.h:27
catapult::cache::MemoryUtCache
Cache for all unconfirmed transactions.
Definition: MemoryUtCache.h:81
FeeUtils.h
catapult::model::EntityInfo::pEntity
std::shared_ptr< TEntity > pEntity
Entity pointer.
Definition: EntityInfo.h:45
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::MemoryUtCache::view
MemoryUtCacheView view() const
Gets a read only view based on this cache.
Definition: MemoryUtCache.cpp:223
catapult::harvesting::TransactionsInfo::TransactionHashes
std::vector< Hash256 > TransactionHashes
Transaction hashes (ordered).
Definition: TransactionsInfoSupplier.h:41
catapult::utils::ByteArray
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
BlockUtils.h
catapult::harvesting::HarvestingUtFacade
Facade around unconfirmed transactions cache and updater.
Definition: HarvestingUtFacadeFactory.h:30
catapult::cache::GetFirstTransactionInfoPointers
std::vector< const model::TransactionInfo * > GetFirstTransactionInfoPointers(const MemoryUtCacheView &utCacheView, uint32_t count)
Definition: MemoryUtCacheUtils.cpp:25