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 (rxcpp::observable< std::shared_ptr< shared_model::interface::Block >> blocks, ametsuchi::MutableStorage &storage) const =0
 

Detailed Description

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

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

Implemented in iroha::validation::ChainValidatorImpl.


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