hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::main::BlockLoader Class Reference

#include "raw_block_loader.hpp"

Collaboration diagram for iroha::main::BlockLoader:
Collaboration graph

Public Member Functions

 BlockLoader (logger::LoggerPtr log)
 
boost::optional< std::shared_ptr< shared_model::interface::Block > > parseBlock (const std::string &data)
 
boost::optional< std::string > loadFile (const std::string &path)
 

Detailed Description

Class provide functionality to insert blocks to storage without any validation. This class will be useful for creating test environment and testing pipeline.

Constructor & Destructor Documentation

iroha::main::BlockLoader::BlockLoader ( logger::LoggerPtr  log)
explicit

Member Function Documentation

boost::optional< std::string > iroha::main::BlockLoader::loadFile ( const std::string &  path)

Loading file from target path

Parameters
path- target file
Returns
string with file content or nullopt

Here is the caller graph for this function:

boost::optional< std::shared_ptr< Block > > iroha::main::BlockLoader::parseBlock ( const std::string &  data)

Parse block from file

Parameters
data- raw presenetation of block
Returns
object if operation done successfully, nullopt otherwise

The documentation for this class was generated from the following files: