|
CatapultServer
v0.5.0.1 (Elephant)
|
Extensions for working with blocks. More...

Public Member Functions | |
| BlockExtensions (const GenerationHash &generationHash) | |
| BlockExtensions (const GenerationHash &generationHash, const model::TransactionRegistry &transactionRegistry) | |
| void | updateBlockTransactionsHash (model::Block &block) const |
| void | calculateBlockTransactionsHash (const model::Block &block, Hash256 &blockTransactionsHash) const |
| void | signFullBlock (const crypto::KeyPair &signer, model::Block &block) const |
| Cryptographically signs a full block with signer. More... | |
| VerifyFullBlockResult | verifyFullBlock (const model::Block &block) const |
| Cryptographically verifies a full block by checking all signatures and hashes. More... | |
| model::BlockElement | convertBlockToBlockElement (const model::Block &block, const GenerationHash &generationHash) const |
Private Attributes | |
| GenerationHash | m_generationHash |
| std::function< Hash256(const model::Transaction &)> | m_calculateTransactionEntityHash |
| std::function< Hash256(const model::Transaction &, const Hash256 &)> | m_calculateTransactionMerkleComponentHash |
Extensions for working with blocks.
|
explicit |
Creates extensions for blocks containing only basic transactions for the network with the specified generation hash (generationHash).

| catapult::extensions::BlockExtensions::BlockExtensions | ( | const GenerationHash & | generationHash, |
| const model::TransactionRegistry & | transactionRegistry | ||
| ) |
Creates extensions for blocks containing transactions registered in transactionRegistry for the network with the specified generation hash (generationHash).

| void catapult::extensions::BlockExtensions::calculateBlockTransactionsHash | ( | const model::Block & | block, |
| Hash256 & | blockTransactionsHash | ||
| ) | const |
Calculates the block transactions hash of block into blockTransactionsHash.


| model::BlockElement catapult::extensions::BlockExtensions::convertBlockToBlockElement | ( | const model::Block & | block, |
| const GenerationHash & | generationHash | ||
| ) | const |
Converts block to a block element with the specified block generation hash (generationHash).


| void catapult::extensions::BlockExtensions::signFullBlock | ( | const crypto::KeyPair & | signer, |
| model::Block & | block | ||
| ) | const |
Cryptographically signs a full block with signer.


| void catapult::extensions::BlockExtensions::updateBlockTransactionsHash | ( | model::Block & | block | ) | const |
Calculates and updates the block transactions hash of block.


| VerifyFullBlockResult catapult::extensions::BlockExtensions::verifyFullBlock | ( | const model::Block & | block | ) | const |
Cryptographically verifies a full block by checking all signatures and hashes.

|
private |
|
private |
|
private |