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

#include "wsv_restorer_impl.hpp"

Inheritance diagram for iroha::ametsuchi::WsvRestorerImpl:
Inheritance graph
Collaboration diagram for iroha::ametsuchi::WsvRestorerImpl:
Collaboration graph

Public Member Functions

 WsvRestorerImpl (std::unique_ptr< shared_model::validation::AbstractValidator< shared_model::interface::Block >> interface_validator, std::unique_ptr< shared_model::validation::AbstractValidator< iroha::protocol::Block_v1 >> proto_validator, std::shared_ptr< validation::ChainValidator > validator, logger::LoggerPtr log)
 
virtual ~WsvRestorerImpl ()=default
 
CommitResult restoreWsv (Storage &storagem, bool wait_for_new_blocks) override
 
- Public Member Functions inherited from iroha::ametsuchi::WsvRestorer
virtual ~WsvRestorer ()=default
 

Detailed Description

Recover WSV (World State View).

Returns
true on success, otherwise false

Constructor & Destructor Documentation

◆ WsvRestorerImpl()

iroha::ametsuchi::WsvRestorerImpl::WsvRestorerImpl ( std::unique_ptr< shared_model::validation::AbstractValidator< shared_model::interface::Block >>  interface_validator,
std::unique_ptr< shared_model::validation::AbstractValidator< iroha::protocol::Block_v1 >>  proto_validator,
std::shared_ptr< validation::ChainValidator validator,
logger::LoggerPtr  log 
)

◆ ~WsvRestorerImpl()

virtual iroha::ametsuchi::WsvRestorerImpl::~WsvRestorerImpl ( )
virtualdefault

Member Function Documentation

◆ restoreWsv()

CommitResult iroha::ametsuchi::WsvRestorerImpl::restoreWsv ( Storage storagem,
bool  wait_for_new_blocks 
)
overridevirtual

Recover WSV (World State View). Drop storage and apply blocks one by one.

Parameters
storageof blocks in ledger
wait_for_new_blocks- flag for wait for new blocks mode. Method waits for new blocks in block storage.
Returns
ledger state after restoration on success, otherwise error string

Implements iroha::ametsuchi::WsvRestorer.

Here is the call graph for this function:

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