Iroha - A simple, decentralized ledger http://iroha.tech
iroha::consensus::yac::NetworkImpl Class Reference

#include "network_impl.hpp"

Inheritance diagram for iroha::consensus::yac::NetworkImpl:
Inheritance graph
Collaboration diagram for iroha::consensus::yac::NetworkImpl:
Collaboration graph

Public Member Functions

 NetworkImpl (std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >> async_call)
void subscribe (std::shared_ptr< YacNetworkNotifications > handler) override
void sendState (const shared_model::interface::Peer &to, const std::vector< VoteMessage > &state) override
grpc::Status SendState (::grpc::ServerContext *context, const ::iroha::consensus::yac::proto::State *request,::google::protobuf::Empty *response) override
- Public Member Functions inherited from iroha::consensus::yac::YacNetwork
virtual ~YacNetwork ()=default

Detailed Description

Class which provides implementation of transport for consensus based on grpc

Constructor & Destructor Documentation

iroha::consensus::yac::NetworkImpl::NetworkImpl ( std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >>  async_call)

Member Function Documentation

void iroha::consensus::yac::NetworkImpl::sendState ( const shared_model::interface::Peer to,
const std::vector< VoteMessage > &  state 

Directly share collection of votes

to- peer recipient
state- message for sending

Implements iroha::consensus::yac::YacNetwork.

Here is the call graph for this function:

grpc::Status iroha::consensus::yac::NetworkImpl::SendState ( ::grpc::ServerContext *  context,
const ::iroha::consensus::yac::proto::State *  request,
::google::protobuf::Empty *  response 

Receive votes from another peer; Naming is confusing, because this is rpc call that perform on another machine;

Here is the call graph for this function:

void iroha::consensus::yac::NetworkImpl::subscribe ( std::shared_ptr< YacNetworkNotifications handler)

The documentation for this class was generated from the following files: