hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
wsv_restorer_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_WSVRESTORERIMPL_HPP
7 #define IROHA_WSVRESTORERIMPL_HPP
8 
11 #include "common/result.hpp"
12 #include "logger/logger_fwd.hpp"
13 
14 namespace shared_model {
15  namespace interface {
16  class Block;
17  }
18  namespace validation {
19  template <typename Model>
21  }
22 } // namespace shared_model
23 
24 namespace iroha {
25  namespace protocol {
26  class Block_v1;
27  }
28  namespace validation {
29  class ChainValidator;
30  }
31  namespace ametsuchi {
32 
37  class WsvRestorerImpl : public WsvRestorer {
38  public:
41  shared_model::interface::Block>> interface_validator,
43  iroha::protocol::Block_v1>> proto_validator,
44  std::shared_ptr<validation::ChainValidator> validator,
45  logger::LoggerPtr log);
46 
47  virtual ~WsvRestorerImpl() = default;
57  CommitResult restoreWsv(Storage &storagem,
58  bool wait_for_new_blocks) override;
59 
60  private:
63  interface_validator_;
65  iroha::protocol::Block_v1>>
66  proto_validator_;
67  std::shared_ptr<validation::ChainValidator> validator_;
68  logger::LoggerPtr log_;
69  };
70 
71  } // namespace ametsuchi
72 } // namespace iroha
73 
74 #endif // IROHA_WSVRESTORERIMPL_HPP
Definition: wsv_restorer_impl.hpp:20
Definition: result_fwd.hpp:27
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: storage.hpp:38
Definition: wsv_restorer.hpp:18
Definition: block.hpp:16
Definition: chain_validator.hpp:30
Definition: block_query.hpp:15
Definition: command_executor.hpp:12
Definition: wsv_restorer_impl.hpp:37