Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ametsuchi::MutableStorage Class Referenceabstract

#include "mutable_storage.hpp"

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

Public Types

using MutableStoragePredicate = std::function< bool(std::shared_ptr< const shared_model::interface::Block >, const LedgerState &)>

Public Member Functions

virtual bool apply (std::shared_ptr< const shared_model::interface::Block > block)=0
virtual bool apply (rxcpp::observable< std::shared_ptr< shared_model::interface::Block >> blocks, MutableStoragePredicate predicate)=0
virtual ~MutableStorage ()=default

Detailed Description

Mutable storage is used apply blocks to the storage. Allows to query the world state view, transactions, and blocks.

Member Typedef Documentation

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

Predicate type checking block Function parameters:

  • Block - block to be checked
  • LedgerState - the state of ledger on which the block is applied

Constructor & Destructor Documentation

virtual iroha::ametsuchi::MutableStorage::~MutableStorage ( )

Member Function Documentation

virtual bool iroha::ametsuchi::MutableStorage::apply ( std::shared_ptr< const shared_model::interface::Block block)
pure virtual

Applies block without additional validation function

See also
apply(block, function)

Implemented in iroha::ametsuchi::MutableStorageImpl.

Here is the caller graph for this function:

virtual bool iroha::ametsuchi::MutableStorage::apply ( rxcpp::observable< std::shared_ptr< shared_model::interface::Block >>  blocks,
MutableStoragePredicate  predicate 
pure virtual

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

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

Implemented in iroha::ametsuchi::MutableStorageImpl.

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