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::Logger log=logger::log("BlockLoader"))
 
boost::optional< std::shared_ptr< shared_model::interface::Block > > parseBlock (const std::string &data)
 
boost::optional< std::stringloadFile (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::Logger  log = logger::log("BlockLoader"))
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 call graph for this function:

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

Here is the caller graph for this function:


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