6 #ifndef IROHA_MST_TRANSPORT_GRPC_HPP 7 #define IROHA_MST_TRANSPORT_GRPC_HPP 9 #include "mst.grpc.pb.h" 24 class TxPresenceCache;
28 template <
typename Service>
32 public transport::MstTransportGrpc::Service {
39 using Service = transport::MstTransportGrpc;
45 std::shared_ptr<TransportFactoryType> transaction_factory,
46 std::shared_ptr<shared_model::interface::TransactionBatchParser>
48 std::shared_ptr<shared_model::interface::TransactionBatchFactory>
49 transaction_batch_factory,
50 std::shared_ptr<iroha::ametsuchi::TxPresenceCache> tx_presence_cache,
51 std::shared_ptr<Completer> mst_completer,
52 shared_model::interface::types::PublicKeyHexStringView my_key,
55 std::unique_ptr<MstClientFactory> client_factory);
65 ::grpc::ServerContext *context,
66 const ::iroha::network::transport::MstState *request,
67 ::google::protobuf::Empty *response)
override;
70 std::shared_ptr<MstTransportNotification> notification)
override;
72 rxcpp::observable<bool> sendState(
73 std::shared_ptr<shared_model::interface::Peer const> to,
74 MstState const &providing_state)
override;
77 std::weak_ptr<MstTransportNotification> subscriber_;
78 std::shared_ptr<network::AsyncGrpcClient<google::protobuf::Empty>>
80 std::shared_ptr<TransportFactoryType> transaction_factory_;
81 std::shared_ptr<shared_model::interface::TransactionBatchParser>
83 std::shared_ptr<shared_model::interface::TransactionBatchFactory>
85 std::shared_ptr<iroha::ametsuchi::TxPresenceCache> tx_presence_cache_;
87 std::shared_ptr<Completer> mst_completer_;
88 std::string
const my_key_;
94 std::shared_ptr<MstClientFactory> client_factory_;
99 shared_model::interface::types::PublicKeyHexStringView sender_key,
100 transport::MstTransportGrpc::StubInterface &client_stub,
102 std::function<
void(
grpc::Status &, google::protobuf::Empty &)>
108 #endif // IROHA_MST_TRANSPORT_GRPC_HPP Definition: block_query.hpp:17
Definition: mst_state.hpp:76
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
transport::MstTransportGrpc Service
Definition: mst_transport_grpc.hpp:39
Definition: mst_transport_grpc.hpp:31
void sendStateAsync(MstState const &state, shared_model::interface::types::PublicKeyHexStringView sender_key, transport::MstTransportGrpc::StubInterface &client_stub, AsyncGrpcClient< google::protobuf::Empty > &async_call, std::function< void(grpc::Status &, google::protobuf::Empty &)> on_response={})
Definition: block_query.hpp:15
Definition: mst_transport.hpp:42
Definition: application.hpp:53
Status
Definition: status.hpp:12
Definition: mst_transport_grpc.hpp:29
Definition: application.hpp:100
Definition: transaction.hpp:23