#include "proto_block_factory.hpp"


Public Member Functions | |
| ProtoBlockFactory (std::unique_ptr< shared_model::validation::AbstractValidator< shared_model::interface::Block >> interface_validator, std::unique_ptr< shared_model::validation::AbstractValidator< iroha::protocol::Block >> proto_validator) | |
| std::unique_ptr< interface::Block > | unsafeCreateBlock (interface::types::HeightType height, const interface::types::HashType &prev_hash, interface::types::TimestampType created_time, const interface::types::TransactionsCollectionType &txs, const interface::types::HashCollectionType &rejected_hashes) override |
| iroha::expected::Result< std::unique_ptr< interface::Block >, std::string > | createBlock (iroha::protocol::Block block) |
Public Member Functions inherited from shared_model::interface::UnsafeBlockFactory | |
| virtual | ~UnsafeBlockFactory ()=default |
ProtoBlockFactory is used to create proto::Block objects
| ProtoBlockFactory::ProtoBlockFactory | ( | std::unique_ptr< shared_model::validation::AbstractValidator< shared_model::interface::Block >> | interface_validator, |
| std::unique_ptr< shared_model::validation::AbstractValidator< iroha::protocol::Block >> | proto_validator | ||
| ) |
| iroha::expected::Result< std::unique_ptr< shared_model::interface::Block >, std::string > ProtoBlockFactory::createBlock | ( | iroha::protocol::Block | block | ) |
Create block variant
| block | - proto block from which block variant is created |

|
overridevirtual |
Create block without any validation
| height | - block height |
| prev_hash | - hash of the previous block |
| created_time | - time the block is created |
| txs | - list of transactions. If it empty, EmptyBlock is creted |
Implements shared_model::interface::UnsafeBlockFactory.
