6 #ifndef IROHA_MST_TRANSPORT_GRPC_HPP 7 #define IROHA_MST_TRANSPORT_GRPC_HPP 9 #include "mst.grpc.pb.h" 24 class TxPresenceCache;
29 public transport::MstTransportGrpc::Service {
32 std::unique_ptr<transport::MstTransportGrpc::StubInterface>(
42 std::shared_ptr<TransportFactoryType> transaction_factory,
43 std::shared_ptr<shared_model::interface::TransactionBatchParser>
45 std::shared_ptr<shared_model::interface::TransactionBatchFactory>
46 transaction_batch_factory,
47 std::shared_ptr<iroha::ametsuchi::TxPresenceCache> tx_presence_cache,
48 std::shared_ptr<Completer> mst_completer,
49 shared_model::interface::types::PublicKeyHexStringView my_key,
52 boost::optional<SenderFactory> = boost::none);
62 ::grpc::ServerContext *context,
63 const ::iroha::network::transport::MstState *request,
64 ::google::protobuf::Empty *response)
override;
67 std::shared_ptr<MstTransportNotification> notification)
override;
69 rxcpp::observable<bool> sendState(
70 std::shared_ptr<shared_model::interface::Peer const> to,
71 MstState const &providing_state)
override;
74 std::weak_ptr<MstTransportNotification> subscriber_;
75 std::shared_ptr<network::AsyncGrpcClient<google::protobuf::Empty>>
77 std::shared_ptr<TransportFactoryType> transaction_factory_;
78 std::shared_ptr<shared_model::interface::TransactionBatchParser>
80 std::shared_ptr<shared_model::interface::TransactionBatchFactory>
82 std::shared_ptr<iroha::ametsuchi::TxPresenceCache> tx_presence_cache_;
84 std::shared_ptr<Completer> mst_completer_;
85 std::string
const my_key_;
91 boost::optional<SenderFactory> sender_factory_;
97 shared_model::interface::types::PublicKeyHexStringView sender_key,
99 std::function<
void(
grpc::Status &, google::protobuf::Empty &)>
105 #endif // IROHA_MST_TRANSPORT_GRPC_HPP std::function< std::unique_ptr< transport::MstTransportGrpc::StubInterface >(const shared_model::interface::Peer &)> SenderFactory
Definition: mst_transport_grpc.hpp:33
Definition: mst_state.hpp:76
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: mst_transport_grpc.hpp:28
Definition: block_query.hpp:15
void sendStateAsync(shared_model::interface::Peer const &to, MstState const &state, shared_model::interface::types::PublicKeyHexStringView sender_key, AsyncGrpcClient< google::protobuf::Empty > &async_call, std::function< void(grpc::Status &, google::protobuf::Empty &)> on_response={})
Definition: mst_transport.hpp:42
Definition: async_grpc_client.hpp:25
Status
Definition: status.hpp:12
Definition: query_service.hpp:24
Definition: transaction.hpp:23