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-observable-fwd.hpp>
14 
15 namespace shared_model {
16  namespace interface {
17  class Block;
18  } // namespace interface
19 } // namespace shared_model
20 
21 namespace iroha {
22  namespace ametsuchi {
23 
24  class WsvQuery;
25 
31  public:
38  using MutableStoragePredicate = std::function<bool(
39  std::shared_ptr<const shared_model::interface::Block>,
40  const LedgerState &)>;
41 
46  virtual bool apply(
47  std::shared_ptr<const shared_model::interface::Block> block) = 0;
48 
57  virtual bool apply(
58  rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>
59  blocks,
60  MutableStoragePredicate predicate) = 0;
61 
62  virtual ~MutableStorage() = default;
63  };
64 
65  } // namespace ametsuchi
66 } // namespace iroha
67 
68 #endif // IROHA_MUTABLE_STORAGE_HPP
decltype(auto) constexpr apply(Tuple &&t, F &&f)
apply F to Tuple
Definition: soci_utils.hpp:72
std::function< bool(std::shared_ptr< const shared_model::interface::Block >, const LedgerState &)> MutableStoragePredicate
Definition: mutable_storage.hpp:40
Definition: block_query.hpp:14
Definition: mutable_storage.hpp:30
Definition: ledger_state.hpp:23
Definition: command_executor.hpp:12