hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
mutable_storage.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_MUTABLE_STORAGE_HPP
7 #define IROHA_MUTABLE_STORAGE_HPP
8 
9 #include <functional>
10 
11 #include <rxcpp/rx.hpp>
13 
14 namespace shared_model {
15  namespace interface {
16  class Block;
17  } // namespace interface
18 } // namespace shared_model
19 
20 namespace iroha {
21  namespace ametsuchi {
22 
23  class WsvQuery;
24  class PeerQuery;
25 
31  public:
40  std::function<bool(const shared_model::interface::Block &,
41  PeerQuery &,
43 
48  virtual bool apply(const shared_model::interface::Block &block) = 0;
49 
58  virtual bool apply(
59  rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>
60  blocks,
61  MutableStoragePredicate predicate) = 0;
62 
63  virtual ~MutableStorage() = default;
64  };
65 
66  } // namespace ametsuchi
67 } // namespace iroha
68 
69 #endif // IROHA_MUTABLE_STORAGE_HPP
decltype(auto) constexpr apply(Tuple &&t, F &&f)
apply F to Tuple
Definition: soci_utils.hpp:72
Definition: hash.hpp:18
Definition: peer_query.hpp:25
Definition: block.hpp:15
Definition: block_query.hpp:16
Definition: mutable_storage.hpp:30
std::function< bool(const shared_model::interface::Block &, PeerQuery &, const shared_model::interface::types::HashType &)> MutableStoragePredicate
Definition: mutable_storage.hpp:42
Definition: command_executor.hpp:12