CatapultServer  v0.5.0.1 (Elephant)
BlockStatement.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "ResolutionStatement.h"
23 #include "TransactionStatement.h"
24 #include <map>
25 
26 namespace catapult { namespace model {
27 
29  struct BlockStatement {
31  std::map<ReceiptSource, TransactionStatement> TransactionStatements;
32 
34  std::map<UnresolvedAddress, AddressResolutionStatement> AddressResolutionStatements;
35 
37  std::map<UnresolvedMosaicId, MosaicResolutionStatement> MosaicResolutionStatements;
38  };
39 
41  Hash256 CalculateMerkleHash(const BlockStatement& statement);
42 
44  std::vector<Hash256> CalculateMerkleTree(const BlockStatement& statement);
45 
47  size_t CountTotalStatements(const BlockStatement& statement);
48 
50  void DeepCopyTo(BlockStatement& destination, const BlockStatement& source);
51 
53  void DeepCopyTo(BlockStatement& destination, const BlockStatement& source, uint32_t maxSourcePrimaryId);
54 }}
ResolutionStatement.h
TransactionStatement.h
MerkleHashBuilder.h
catapult::model::BlockStatement
Collection of statements scoped to a block.
Definition: BlockStatement.h:29
catapult::model::BlockStatement::TransactionStatements
std::map< ReceiptSource, TransactionStatement > TransactionStatements
Transaction statements.
Definition: BlockStatement.h:31
catapult::model::BlockStatement::AddressResolutionStatements
std::map< UnresolvedAddress, AddressResolutionStatement > AddressResolutionStatements
Address resolution statements.
Definition: BlockStatement.h:34
catapult::model::CalculateMerkleHash
Hash256 CalculateMerkleHash(const BlockStatement &statement)
Calculates the merkle hash for statement.
Definition: BlockStatement.cpp:83
catapult::model::BlockStatement::MosaicResolutionStatements
std::map< UnresolvedMosaicId, MosaicResolutionStatement > MosaicResolutionStatements
Mosaic resolution statements.
Definition: BlockStatement.h:37
catapult::model::CountTotalStatements
size_t CountTotalStatements(const BlockStatement &statement)
Counts the total number of statements in statement.
Definition: BlockStatement.cpp:95
BlockStatement.h
catapult::model::CalculateMerkleTree
std::vector< Hash256 > CalculateMerkleTree(const BlockStatement &statement)
Calculates the merkle tree for statement.
Definition: BlockStatement.cpp:89
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Hash256_Size, Hash256_tag >
catapult::model::DeepCopyTo
void DeepCopyTo(BlockStatement &destination, const BlockStatement &source)
Creates a deep copy of source into destination.
Definition: BlockStatement.cpp:101