hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
consensus_service_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_YAC_SERVICE_IMPL_HPP
7 #define IROHA_YAC_SERVICE_IMPL_HPP
8 
9 #include "yac.grpc.pb.h"
10 
11 #include <memory>
12 
14 #include "logger/logger_fwd.hpp"
15 
16 namespace iroha::consensus::yac {
21  class ServiceImpl : public proto::Yac::Service {
22  public:
23  using Service = proto::Yac;
24 
26  std::function<void(std::vector<VoteMessage>)> callback);
27 
33  grpc::Status SendState(::grpc::ServerContext *context,
34  const ::iroha::consensus::yac::proto::State *request,
35  ::google::protobuf::Empty *response) override;
36 
37  private:
38  std::function<void(std::vector<VoteMessage>)> callback_;
39 
40  logger::LoggerPtr log_;
41  };
42 } // namespace iroha::consensus::yac
43 
44 #endif // IROHA_YAC_SERVICE_IMPL_HPP
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: consensus_service_impl.hpp:21
ServiceImpl(logger::LoggerPtr log, std::function< void(std::vector< VoteMessage >)> callback)
Definition: consensus_service_impl.cpp:12
proto::Yac Service
Definition: consensus_service_impl.hpp:23
grpc::Status SendState(::grpc::ServerContext *context, const ::iroha::consensus::yac::proto::State *request, ::google::protobuf::Empty *response) override
Definition: consensus_service_impl.cpp:16
Status
Definition: status.hpp:12
Definition: cluster_order.hpp:16