hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
mst_types.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_MST_TYPES_HPP
7 #define IROHA_MST_TYPES_HPP
8 
9 #include <memory>
10 
12 
13 namespace shared_model {
14  namespace interface {
15  class TransactionBatch;
16  class TransactionResponse;
17  class Peer;
18  } // namespace interface
19 } // namespace shared_model
20 
21 namespace iroha {
22 
23  using BatchPtr = std::shared_ptr<shared_model::interface::TransactionBatch>;
26  using TxResponse =
27  std::shared_ptr<shared_model::interface::TransactionResponse>;
28 
29  template <typename T>
30  using ConstRefT = const T &;
31 
35 
36  class MstState;
37 
39 
40  using DataType = BatchPtr;
41 
48  StateUpdateResult(std::shared_ptr<MstState> completed_state,
49  std::shared_ptr<MstState> updated_state)
50  : completed_state_{std::move(completed_state)},
51  updated_state_{std::move(updated_state)} {}
52  std::shared_ptr<MstState> completed_state_;
53  std::shared_ptr<MstState> updated_state_;
54  };
55 } // namespace iroha
56 
57 #endif // IROHA_MST_TYPES_HPP
ConstRefT< shared_model::interface::Peer > ConstRefPeer
Definition: mst_types.hpp:33
StateUpdateResult(std::shared_ptr< MstState > completed_state, std::shared_ptr< MstState > updated_state)
Definition: mst_types.hpp:48
std::shared_ptr< shared_model::interface::TransactionResponse > TxResponse
Definition: mst_types.hpp:27
ConstRefT< BatchPtr > ConstRefBatch
Definition: mst_types.hpp:32
Definition: peer.hpp:18
Definition: mst_state.hpp:89
ConstRefT< TimeType > ConstRefTime
Definition: mst_types.hpp:34
const T & ConstRefT
Definition: mst_types.hpp:30
Definition: block_query.hpp:16
shared_model::interface::types::TimestampType TimeType
Definition: mst_types.hpp:25
std::shared_ptr< MstState > completed_state_
Definition: mst_types.hpp:52
Definition: mst_types.hpp:47
std::shared_ptr< MstState > updated_state_
Definition: mst_types.hpp:53
BatchPtr DataType
Definition: mst_types.hpp:40
Definition: command_executor.hpp:12
std::shared_ptr< shared_model::interface::TransactionBatch > BatchPtr
Definition: mst_types.hpp:23
ConstRefT< MstState > ConstRefState
Definition: mst_types.hpp:38
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:59