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

#include "chain_validator.hpp"

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

Public Member Functions

virtual ~ChainValidator ()=default
 
virtual bool validateAndApply (std::shared_ptr< const shared_model::interface::Block > block, ametsuchi::MutableStorage &storage) const =0
 

Detailed Description

ChainValidator is interface of chain validation, that is required on commit step of consensus

Constructor & Destructor Documentation

◆ ~ChainValidator()

virtual iroha::validation::ChainValidator::~ChainValidator ( )
virtualdefault

Member Function Documentation

◆ validateAndApply()

virtual bool iroha::validation::ChainValidator::validateAndApply ( std::shared_ptr< const shared_model::interface::Block block,
ametsuchi::MutableStorage storage 
) const
pure virtual

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

Implemented in iroha::validation::ChainValidatorImpl.


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