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

#include "mutable_storage_impl.hpp"

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

Public Member Functions

 MutableStorageImpl (boost::optional< std::shared_ptr< const iroha::LedgerState >> ledger_state, std::shared_ptr< PostgresCommandExecutor > command_executor, std::unique_ptr< BlockStorage > block_storage, logger::LoggerManagerTreePtr log_manager)
 
bool apply (std::shared_ptr< const shared_model::interface::Block > block) override
 
bool apply (rxcpp::observable< std::shared_ptr< shared_model::interface::Block >> blocks, MutableStoragePredicate predicate) override
 
boost::optional< std::shared_ptr< const iroha::LedgerState > > getLedgerState () const
 
 ~MutableStorageImpl () override
 
- Public Member Functions inherited from iroha::ametsuchi::MutableStorage
virtual ~MutableStorage ()=default
 

Friends

class StorageImpl
 

Additional Inherited Members

- Public Types inherited from iroha::ametsuchi::MutableStorage
using MutableStoragePredicate = std::function< bool(std::shared_ptr< const shared_model::interface::Block >, const LedgerState &)>
 

Constructor & Destructor Documentation

iroha::ametsuchi::MutableStorageImpl::MutableStorageImpl ( boost::optional< std::shared_ptr< const iroha::LedgerState >>  ledger_state,
std::shared_ptr< PostgresCommandExecutor command_executor,
std::unique_ptr< BlockStorage block_storage,
logger::LoggerManagerTreePtr  log_manager 
)

Here is the call graph for this function:

iroha::ametsuchi::MutableStorageImpl::~MutableStorageImpl ( )
override

Member Function Documentation

bool iroha::ametsuchi::MutableStorageImpl::apply ( std::shared_ptr< const shared_model::interface::Block block)
overridevirtual

Applies block without additional validation function

See also
apply(block, function)

Implements iroha::ametsuchi::MutableStorage.

Here is the caller graph for this function:

bool iroha::ametsuchi::MutableStorageImpl::apply ( rxcpp::observable< std::shared_ptr< shared_model::interface::Block >>  blocks,
MutableStoragePredicate  predicate 
)
overridevirtual

Applies an observable of blocks to current mutable state using logic specified in function

Parameters
blocksBlocks to be applied
predicateChecks whether block is applicable prior to applying transactions
Returns
True if blocks were successfully applied, false otherwise.

Implements iroha::ametsuchi::MutableStorage.

Here is the call graph for this function:

boost::optional< std::shared_ptr< const iroha::LedgerState > > iroha::ametsuchi::MutableStorageImpl::getLedgerState ( ) const

Friends And Related Function Documentation

friend class StorageImpl
friend

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