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 (std::shared_ptr< const shared_model::interface::Block > block, ametsuchi::MutableStorage &storage) const override
 
- Public Member Functions inherited from iroha::validation::ChainValidator
virtual ~ChainValidator ()=default
 

Constructor & Destructor Documentation

◆ ChainValidatorImpl()

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

Member Function Documentation

◆ validateAndApply()

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

Try to apply the block to the storage.

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

Parameters
block- block to 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: