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

#include "block_loader_impl.hpp"

Inheritance diagram for iroha::network::BlockLoaderImpl:
Inheritance graph
Collaboration diagram for iroha::network::BlockLoaderImpl:
Collaboration graph

Public Member Functions

 BlockLoaderImpl (std::shared_ptr< ametsuchi::PeerQueryFactory > peer_query_factory, shared_model::proto::ProtoBlockFactory factory, logger::LoggerPtr log)
 
rxcpp::observable< std::shared_ptr< shared_model::interface::Block > > retrieveBlocks (const shared_model::interface::types::HeightType height, const shared_model::crypto::PublicKey &peer_pubkey) override
 
boost::optional< std::shared_ptr< shared_model::interface::Block > > retrieveBlock (const shared_model::crypto::PublicKey &peer_pubkey, shared_model::interface::types::HeightType block_height) override
 
- Public Member Functions inherited from iroha::network::BlockLoader
virtual ~BlockLoader ()=default
 

Constructor & Destructor Documentation

BlockLoaderImpl::BlockLoaderImpl ( std::shared_ptr< ametsuchi::PeerQueryFactory peer_query_factory,
shared_model::proto::ProtoBlockFactory  factory,
logger::LoggerPtr  log 
)

Member Function Documentation

boost::optional< std::shared_ptr< Block > > BlockLoaderImpl::retrieveBlock ( const shared_model::crypto::PublicKey peer_pubkey,
shared_model::interface::types::HeightType  block_height 
)
overridevirtual

Retrieve block by its block_height from given peer

Parameters
peer_pubkey- peer for requesting blocks
block_height- requested block height
Returns
block on success, nullopt on failure TODO 14/02/17 () IR-960 rework method with returning result

Implements iroha::network::BlockLoader.

Here is the call graph for this function:

rxcpp::observable< std::shared_ptr< Block > > BlockLoaderImpl::retrieveBlocks ( const shared_model::interface::types::HeightType  height,
const shared_model::crypto::PublicKey peer_pubkey 
)
overridevirtual

Retrieve block from given peer starting from current top

Parameters
height- top block height in requester's peer storage
peer_pubkey- peer for requesting blocks
Returns

Implements iroha::network::BlockLoader.

Here is the call graph for this function:


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