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.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::Logger log = logger::log("BlockLoader"));
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::Logger log_;
51  };
52 
53  } // namespace main
54 } // namespace iroha
55 #endif // IROHA_RAW_BLOCK_INSERTION_HPP
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
int main(int argc, char *argv[])
Definition: irohad.cpp:88
std::shared_ptr< spdlog::logger > Logger
Definition: logger.hpp:26
Definition: block_query.hpp:16
Logger log(const std::string &tag)
Definition: logger.cpp:48
Definition: raw_block_loader.hpp:30
Definition: command_executor.hpp:12