hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
raw_block_loader.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_RAW_BLOCK_INSERTION_HPP
7 #define IROHA_RAW_BLOCK_INSERTION_HPP
8 
9 #include <memory>
10 #include <string>
11 
12 #include <boost/optional.hpp>
13 
14 #include "logger/logger_fwd.hpp"
15 
16 namespace shared_model {
17  namespace interface {
18  class Block;
19  }
20 } // namespace shared_model
21 
22 namespace iroha {
23  namespace main {
30  class BlockLoader {
31  public:
32  explicit BlockLoader(logger::LoggerPtr log);
33 
39  boost::optional<std::shared_ptr<shared_model::interface::Block>>
40  parseBlock(const std::string &data);
41 
47  boost::optional<std::string> loadFile(const std::string &path);
48 
49  private:
50  logger::LoggerPtr log_;
51  };
52 
53  } // namespace main
54 } // namespace iroha
55 #endif // IROHA_RAW_BLOCK_INSERTION_HPP
int main(int argc, char *argv[])
Definition: irohad.cpp:120
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:14
Definition: raw_block_loader.hpp:30
Definition: command_executor.hpp:12