6 #ifndef IROHA_MUTABLE_STORAGE_IMPL_HPP 7 #define IROHA_MUTABLE_STORAGE_IMPL_HPP 11 #include <soci/soci.h> 22 class PostgresCommandExecutor;
23 class PostgresWsvCommand;
24 class TransactionExecutor;
31 boost::optional<std::shared_ptr<const iroha::LedgerState>>
33 std::shared_ptr<PostgresCommandExecutor> command_executor,
34 std::unique_ptr<BlockStorage> block_storage,
38 std::shared_ptr<const shared_model::interface::Block> block)
override;
40 bool apply(rxcpp::observable<
41 std::shared_ptr<shared_model::interface::Block>> blocks,
44 boost::optional<std::shared_ptr<const iroha::LedgerState>>
59 template <
typename Function>
60 bool withSavepoint(Function &&
function);
66 bool apply(std::shared_ptr<const shared_model::interface::Block> block,
69 boost::optional<std::shared_ptr<const iroha::LedgerState>> ledger_state_;
72 std::unique_ptr<PostgresWsvCommand> wsv_command_;
73 std::unique_ptr<PeerQuery> peer_query_;
74 std::unique_ptr<BlockIndex> block_index_;
75 std::shared_ptr<TransactionExecutor> transaction_executor_;
76 std::unique_ptr<BlockStorage> block_storage_;
85 #endif // IROHA_MUTABLE_STORAGE_IMPL_HPP
Definition: block_storage.hpp:23
Definition: result_fwd.hpp:27
bool apply(std::shared_ptr< const shared_model::interface::Block > block) override
Definition: mutable_storage_impl.cpp:115
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
boost::optional< std::shared_ptr< const iroha::LedgerState > > getLedgerState() const
Definition: mutable_storage_impl.cpp:141
std::function< bool(std::shared_ptr< const shared_model::interface::Block >, const LedgerState &)> MutableStoragePredicate
Definition: mutable_storage.hpp:44
~MutableStorageImpl() override
Definition: mutable_storage_impl.cpp:176
Definition: block_query.hpp:15
Definition: mutable_storage.hpp:34
std::shared_ptr< LoggerManagerTree > LoggerManagerTreePtr
Definition: logger_manager_fwd.hpp:14
Definition: mutable_storage_impl.hpp:26
MutableStorageImpl(boost::optional< std::shared_ptr< const iroha::LedgerState >> ledger_state, std::shared_ptr< PostgresCommandExecutor > command_executor, std::unique_ptr< BlockStorage > block_storage, logger::LoggerManagerTreePtr log_manager)
Definition: mutable_storage_impl.cpp:28
Definition: storage_impl.hpp:41
expected::Result< CommitResult, std::string > commit(BlockStorage &block_storage) &&override
Definition: mutable_storage_impl.cpp:146