hyperledger/iroha
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 >, PeerQuery &, const shared_model::interface::types::HashType &)>
 

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

Predicate type checking block Function parameters:

  • Block - block to be checked
  • PeerQuery - interface for ledger peers list retrieval
  • HashType - hash of top block in blockchain

Constructor & Destructor Documentation

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

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

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

Implemented in iroha::ametsuchi::MutableStorageImpl.


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