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

#include "chain_validator_impl.hpp"

Inheritance diagram for iroha::validation::ChainValidatorImpl:
Inheritance graph
Collaboration diagram for iroha::validation::ChainValidatorImpl:
Collaboration graph

Public Member Functions

 ChainValidatorImpl (std::shared_ptr< consensus::yac::SupermajorityChecker > supermajority_checker, logger::LoggerPtr log)
 
bool validateAndApply (rxcpp::observable< std::shared_ptr< shared_model::interface::Block >> blocks, ametsuchi::MutableStorage &storage) const override
 
- Public Member Functions inherited from iroha::validation::ChainValidator
virtual ~ChainValidator ()=default
 

Constructor & Destructor Documentation

iroha::validation::ChainValidatorImpl::ChainValidatorImpl ( std::shared_ptr< consensus::yac::SupermajorityChecker supermajority_checker,
logger::LoggerPtr  log 
)

Member Function Documentation

bool iroha::validation::ChainValidatorImpl::validateAndApply ( rxcpp::observable< std::shared_ptr< shared_model::interface::Block >>  blocks,
ametsuchi::MutableStorage storage 
) const
overridevirtual

Try to apply the blocks from observable to the storage.

While applying the blocks it will validate all their signatures and related meta information such as previous hash, height and other meta information

Parameters
blocks- observable with all blocks, that should be applied atomically
storage- storage to which the blocks are applied
Returns
true if commit is valid and successfully applied, false otherwise

Implements iroha::validation::ChainValidator.

Here is the call graph for this function:


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