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>>
57 template <
typename Function>
58 bool withSavepoint(Function &&
function);
64 bool apply(std::shared_ptr<const shared_model::interface::Block> block,
67 boost::optional<std::shared_ptr<const iroha::LedgerState>> ledger_state_;
70 std::unique_ptr<PostgresWsvCommand> wsv_command_;
71 std::unique_ptr<PeerQuery> peer_query_;
72 std::unique_ptr<BlockIndex> block_index_;
73 std::shared_ptr<TransactionExecutor> transaction_executor_;
74 std::unique_ptr<BlockStorage> block_storage_;
83 #endif // IROHA_MUTABLE_STORAGE_IMPL_HPP
Definition: result_fwd.hpp:27
bool apply(std::shared_ptr< const shared_model::interface::Block > block) override
Definition: mutable_storage_impl.cpp:114
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:134
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:158
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
expected::Result< CommitResult, std::string > commit() &&override
Apply the local changes made to this MutableStorage to the global WSV.
Definition: mutable_storage_impl.cpp:139
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:27
Definition: storage_impl.hpp:41