hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::FairMstProcessor Class Reference

#include "mst_processor_impl.hpp"

Inheritance diagram for iroha::FairMstProcessor:
Inheritance graph
Collaboration diagram for iroha::FairMstProcessor:
Collaboration graph

Public Member Functions

 FairMstProcessor (std::shared_ptr< iroha::network::MstTransport > transport, std::shared_ptr< MstStorage > storage, std::shared_ptr< PropagationStrategy > strategy, std::shared_ptr< MstTimeProvider > time_provider, logger::LoggerPtr log)
 
 ~FairMstProcessor ()
 
auto propagateBatchImpl (const DataType &batch) -> decltype(propagateBatch(batch)) override
 
auto onStateUpdateImpl () const -> decltype(onStateUpdate()) override
 
auto onPreparedBatchesImpl () const -> decltype(onPreparedBatches()) override
 
auto onExpiredBatchesImpl () const -> decltype(onExpiredBatches()) override
 
bool batchInStorageImpl (const DataType &batch) const override
 
void onNewState (const shared_model::crypto::PublicKey &from, MstState new_state) override
 
- Public Member Functions inherited from iroha::MstProcessor
void propagateBatch (const DataType &batch)
 
bool batchInStorage (const DataType &batch) const
 
rxcpp::observable< std::shared_ptr< MstState > > onStateUpdate () const
 
rxcpp::observable< DataTypeonPreparedBatches () const
 
rxcpp::observable< DataTypeonExpiredBatches () const
 
virtual ~MstProcessor ()=default
 
- Public Member Functions inherited from iroha::network::MstTransportNotification
virtual ~MstTransportNotification ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from iroha::MstProcessor
 MstProcessor (logger::LoggerPtr log)
 
- Protected Attributes inherited from iroha::MstProcessor
logger::LoggerPtr log_
 

Detailed Description

Effective implementation of MstProcessor, that implements gossip propagation of own state

Constructor & Destructor Documentation

iroha::FairMstProcessor::FairMstProcessor ( std::shared_ptr< iroha::network::MstTransport transport,
std::shared_ptr< MstStorage storage,
std::shared_ptr< PropagationStrategy strategy,
std::shared_ptr< MstTimeProvider time_provider,
logger::LoggerPtr  log 
)
Parameters
transport- connection to other peers in network
storage- repository for storing states
strategy- propagation mechanism for sharing state with others
time_provider- repository of current time
iroha::FairMstProcessor::~FairMstProcessor ( )

Member Function Documentation

bool iroha::FairMstProcessor::batchInStorageImpl ( const DataType batch) const
overridevirtual
See also
batchInStorage method

Implements iroha::MstProcessor.

auto iroha::FairMstProcessor::onExpiredBatchesImpl ( ) const -> decltype(onExpiredBatches())
overridevirtual
See also
onExpiredTransactions method

Implements iroha::MstProcessor.

void iroha::FairMstProcessor::onNewState ( const shared_model::crypto::PublicKey from,
MstState  new_state 
)
overridevirtual

Handler method for updating state, when new data received

Parameters
from- key of the peer emitted the state
new_state- state propagated from peer

Implements iroha::network::MstTransportNotification.

Here is the call graph for this function:

auto iroha::FairMstProcessor::onPreparedBatchesImpl ( ) const -> decltype(onPreparedBatches())
overridevirtual
See also
onPreparedTransactions method

Implements iroha::MstProcessor.

auto iroha::FairMstProcessor::onStateUpdateImpl ( ) const -> decltype(onStateUpdate())
overridevirtual
See also
onStateUpdate method

Implements iroha::MstProcessor.

auto iroha::FairMstProcessor::propagateBatchImpl ( const DataType batch) -> decltype(propagateBatch(batch))
overridevirtual
See also
propagateTransaction method

Implements iroha::MstProcessor.


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