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,
92 virtual auto applyImpl(
93 shared_model::interface::types::PublicKeyHexStringView target_peer_key,
95 -> decltype(
apply(target_peer_key, new_state)) = 0;
97 virtual auto updateOwnStateImpl(
const DataType &tx)
100 virtual auto extractExpiredTransactionsImpl(
const TimeType ¤t_time)
103 virtual auto getDiffStateImpl(
104 shared_model::interface::types::PublicKeyHexStringView target_peer_key,
106 -> decltype(
getDiffState(target_peer_key, current_time)) = 0;
109 -> decltype(
whatsNew(new_state)) = 0;
111 virtual bool batchInStorageImpl(
const DataType &batch)
const = 0;
113 virtual void processFinalizedTransactionImpl(
118 mutable std::mutex mutex_;
124 #endif // IROHA_MST_STORAGE_HPP
logger::LoggerPtr log_
Definition: mst_storage.hpp:121
StateUpdateResult apply(shared_model::interface::types::PublicKeyHexStringView target_peer_key, const MstState &new_state)
Definition: mst_storage.cpp:13
Definition: mst_storage.hpp:23
void processFinalizedTransaction(shared_model::interface::types::HashType const &hash)
Definition: mst_storage.cpp:47
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
hash256_t hash(const T &pb)
Definition: pb_common.hpp:43
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