CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace crypto {
class KeyPair; } }
28 namespace catapult {
namespace model {
71 using Transactions = std::vector<std::shared_ptr<const Transaction>>;
109 const Key& signerPublicKey,
auto Transactions(EntityContainerErrorPolicy errorPolicy=EntityContainerErrorPolicy::Throw)
Definition: TransactionContainer.h:37
void CalculateBlockTransactionsHash(const std::vector< const TransactionInfo * > &transactionInfos, Hash256 &blockTransactionsHash)
Calculates the block transactions hash of transactionInfos into blockTransactionsHash.
Definition: BlockUtils.cpp:42
std::unique_ptr< Block > CreateBlock(const PreviousBlockContext &context, NetworkIdentifier networkIdentifier, const Key &signerPublicKey, const Transactions &transactions)
Definition: BlockUtils.cpp:138
utils::ByteArray< Hash256_Size, Hash256_tag > Hash256
Definition: src/catapult/types.h:47
void SignBlockHeader(const crypto::KeyPair &signer, Block &block)
Definition: BlockUtils.cpp:63
Context passed when creating new block.
Definition: BlockUtils.h:74
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
Builder for building a hash.
Definition: Hashes.h:61
GenerationHash CalculateGenerationHash(const GenerationHash &previousGenerationHash, const Key &publicKey)
Definition: BlockUtils.cpp:50
std::vector< std::shared_ptr< const Transaction > > Transactions
Container of transactions.
Definition: BlockUtils.h:71
std::unique_ptr< Block > StitchBlock(const BlockHeader &blockHeader, const Transactions &transactions)
Creates a new block by stitching together blockHeader and transactions.
Definition: BlockUtils.cpp:146
Information about transactions stored in a block.
Definition: BlockUtils.h:55
catapult::GenerationHash GenerationHash
Generation hash of previous block.
Definition: BlockUtils.h:95
uint32_t Count
Number of transactions.
Definition: BlockUtils.h:57
Hash256 BlockHash
Hash of previous block.
Definition: BlockUtils.h:92
PreviousBlockContext()
Creates an empty context.
Definition: BlockUtils.h:76
Builder for creating a merkle hash.
Definition: MerkleHashBuilder.h:28
void final(OutputType &output) noexcept
Finalize hash calculation. Returns result in output.
Definition: Hashes.cpp:145
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
Key Signer
Entity signer's public key.
Definition: EntityBody.h:36
Amount TotalFee
Total fee of all transactions.
Definition: BlockUtils.h:60
void update(const RawBuffer &dataBuffer) noexcept
Updates the state of hash with data inside dataBuffer.
Definition: Hashes.cpp:134
void update(const Hash256 &hash)
Adds hash to the merkle hash.
Definition: MerkleHashBuilder.cpp:72
uint64_t size
Definition: MemoryCounters.cpp:65
catapult::Timestamp Timestamp
Timestamp of previous block.
Definition: BlockUtils.h:101
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
Processing element for a block composed of a block and metadata.
Definition: Elements.h:55
Binary layout for a block.
Definition: Block.h:69
utils::ClampedBaseValue< uint64_t, Difficulty_tag > Difficulty
Definition: src/catapult/types.h:99
PreviousBlockContext(const BlockElement &blockElement)
Creates a context with blockElement as the previous block.
Definition: BlockUtils.h:84
Definition: AddressExtractionExtension.cpp:28
utils::ByteArray< Hash256_Size, GenerationHash_tag > GenerationHash
Definition: src/catapult/types.h:53
bool Verify(const Key &publicKey, const RawBuffer &dataBuffer, const Signature &signature)
Definition: Signer.cpp:136
BlockTransactionsInfo CalculateBlockTransactionsInfo(const Block &block)
Calculates information about transactions stored in block.
Definition: BlockUtils.cpp:75
Height BlockHeight
Height of previous block.
Definition: BlockUtils.h:98
Amount CalculateTransactionFee(BlockFeeMultiplier feeMultiplier, const Transaction &transaction)
Calculates the fee for transaction contained in block with feeMultiplier.
Definition: FeeUtils.cpp:26
constexpr uint16_t MakeVersion(NetworkIdentifier networkIdentifier, uint8_t version) noexcept
Creates a version field out of given entity version and networkIdentifier.
Definition: EntityBody.h:58
bool VerifyBlockHeaderSignature(const Block &block)
Validates signature of block header.
Definition: BlockUtils.cpp:67
void final(Hash256 &hash)
Finalizes the merkle hash into hash.
Definition: MerkleHashBuilder.cpp:76
void Sign(const KeyPair &keyPair, const RawBuffer &dataBuffer, Signature &computedSignature)
Definition: Signer.cpp:82
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
BasicRawBuffer< const uint8_t > RawBuffer
A const binary buffer.
Definition: RawBuffer.h:62