6 #ifndef IROHA_MST_STORAGE_HPP 7 #define IROHA_MST_STORAGE_HPP 35 shared_model::interface::types::PublicKeyHexStringView target_peer_key,
60 shared_model::interface::types::PublicKeyHexStringView target_peer_key,
89 virtual auto applyImpl(
90 shared_model::interface::types::PublicKeyHexStringView target_peer_key,
92 -> decltype(
apply(target_peer_key, new_state)) = 0;
94 virtual auto updateOwnStateImpl(
const DataType &tx)
97 virtual auto extractExpiredTransactionsImpl(
const TimeType ¤t_time)
100 virtual auto getDiffStateImpl(
101 shared_model::interface::types::PublicKeyHexStringView target_peer_key,
103 -> decltype(
getDiffState(target_peer_key, current_time)) = 0;
106 -> decltype(
whatsNew(new_state)) = 0;
108 virtual bool batchInStorageImpl(
const DataType &batch)
const = 0;
112 mutable std::mutex mutex_;
118 #endif // IROHA_MST_STORAGE_HPP logger::LoggerPtr log_
Definition: mst_storage.hpp:115
StateUpdateResult apply(shared_model::interface::types::PublicKeyHexStringView target_peer_key, const MstState &new_state)
Definition: mst_storage.cpp:13
Definition: mst_storage.hpp:23
Definition: mst_state.hpp:76
StateUpdateResult updateOwnState(const DataType &tx)
Definition: mst_storage.cpp:20
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:15
virtual ~MstStorage()=default
shared_model::interface::types::TimestampType TimeType
Definition: mst_types.hpp:25
bool batchInStorage(const DataType &batch) const
Definition: mst_storage.cpp:43
Definition: mst_types.hpp:48
BatchPtr DataType
Definition: mst_types.hpp:41
MstStorage(logger::LoggerPtr log)
Definition: mst_storage.cpp:11
MstState whatsNew(ConstRefState new_state) const
Definition: mst_storage.cpp:38
MstState extractExpiredTransactions(const TimeType ¤t_time)
Definition: mst_storage.cpp:25
ConstRefT< MstState > ConstRefState
Definition: mst_types.hpp:39
MstState getDiffState(shared_model::interface::types::PublicKeyHexStringView target_peer_key, const TimeType ¤t_time)
Definition: mst_storage.cpp:31