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

#include "simulator.hpp"

Inheritance diagram for iroha::simulator::Simulator:
Inheritance graph
Collaboration diagram for iroha::simulator::Simulator:
Collaboration graph

Public Types

using CryptoSignerType = shared_model::crypto::AbstractCryptoModelSigner< shared_model::interface::Block >
 

Public Member Functions

 Simulator (std::shared_ptr< network::OrderingGate > ordering_gate, std::shared_ptr< validation::StatefulValidator > statefulValidator, std::shared_ptr< ametsuchi::TemporaryFactory > factory, std::shared_ptr< CryptoSignerType > crypto_signer, std::unique_ptr< shared_model::interface::UnsafeBlockFactory > block_factory, logger::LoggerPtr log)
 
 ~Simulator () override
 
boost::optional< std::shared_ptr< validation::VerifiedProposalAndErrors > > processProposal (const shared_model::interface::Proposal &proposal) override
 
rxcpp::observable< VerifiedProposalCreatorEventonVerifiedProposal () override
 
boost::optional< std::shared_ptr< shared_model::interface::Block > > processVerifiedProposal (const std::shared_ptr< iroha::validation::VerifiedProposalAndErrors > &verified_proposal_and_errors, const TopBlockInfo &top_block_info) override
 
rxcpp::observable< BlockCreatorEventonBlock () override
 
- Public Member Functions inherited from iroha::simulator::VerifiedProposalCreator
virtual ~VerifiedProposalCreator ()=default
 
- Public Member Functions inherited from iroha::simulator::BlockCreator
virtual boost::optional< std::shared_ptr< shared_model::interface::Block > > processVerifiedProposal (const std::shared_ptr< validation::VerifiedProposalAndErrors > &verified_proposal_and_errors, const TopBlockInfo &top_block_info)=0
 
virtual ~BlockCreator ()=default
 

Member Typedef Documentation

Constructor & Destructor Documentation

iroha::simulator::Simulator::Simulator ( std::shared_ptr< network::OrderingGate ordering_gate,
std::shared_ptr< validation::StatefulValidator statefulValidator,
std::shared_ptr< ametsuchi::TemporaryFactory factory,
std::shared_ptr< CryptoSignerType crypto_signer,
std::unique_ptr< shared_model::interface::UnsafeBlockFactory block_factory,
logger::LoggerPtr  log 
)
iroha::simulator::Simulator::~Simulator ( )
override

Member Function Documentation

rxcpp::observable< BlockCreatorEvent > iroha::simulator::Simulator::onBlock ( )
overridevirtual

Emit blocks made from proposals

Implements iroha::simulator::BlockCreator.

rxcpp::observable< VerifiedProposalCreatorEvent > iroha::simulator::Simulator::onVerifiedProposal ( )
overridevirtual

Emit proposals which were verified by stateful validator

Implements iroha::simulator::VerifiedProposalCreator.

boost::optional< std::shared_ptr< validation::VerifiedProposalAndErrors > > iroha::simulator::Simulator::processProposal ( const shared_model::interface::Proposal proposal)
overridevirtual

Execute stateful validation for given proposal

Implements iroha::simulator::VerifiedProposalCreator.

Here is the call graph for this function:

boost::optional< std::shared_ptr< shared_model::interface::Block > > iroha::simulator::Simulator::processVerifiedProposal ( const std::shared_ptr< iroha::validation::VerifiedProposalAndErrors > &  verified_proposal_and_errors,
const TopBlockInfo top_block_info 
)
override

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