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

#include "rocksdb_wsv_query.hpp"

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

Public Member Functions

 RocksDBWsvQuery (std::shared_ptr< RocksDBContext > db_context, logger::LoggerPtr log)
 
boost::optional< std::vector< std::string > > getSignatories (const shared_model::interface::types::AccountIdType &account_id) override
 
boost::optional< std::vector< std::shared_ptr< shared_model::interface::Peer > > > getPeers () override
 
boost::optional< std::shared_ptr< shared_model::interface::Peer > > getPeerByPublicKey (shared_model::interface::types::PublicKeyHexStringView public_key) override
 
iroha::expected::Result< iroha::TopBlockInfo, std::string > getTopBlockInfo () const override
 Get top block info from ledger state. More...
 
iroha::expected::Result< size_t, std::string > countPeers () override
 Fetch domains stored in ledger. More...
 
iroha::expected::Result< size_t, std::string > countDomains () override
 Fetch number of domains in ledger. More...
 
iroha::expected::Result< size_t, std::string > countTransactions () override
 Fetch number of valid transactions in ledger. More...
 
- Public Member Functions inherited from iroha::ametsuchi::WsvQuery
virtual ~WsvQuery ()=default
 

Constructor & Destructor Documentation

◆ RocksDBWsvQuery()

iroha::ametsuchi::RocksDBWsvQuery::RocksDBWsvQuery ( std::shared_ptr< RocksDBContext db_context,
logger::LoggerPtr  log 
)

Member Function Documentation

◆ countDomains()

iroha::expected::Result< size_t, std::string > iroha::ametsuchi::RocksDBWsvQuery::countDomains ( )
overridevirtual

Fetch number of domains in ledger.

Returns
number of domains in ledger

Implements iroha::ametsuchi::WsvQuery.

◆ countPeers()

iroha::expected::Result< size_t, std::string > iroha::ametsuchi::RocksDBWsvQuery::countPeers ( )
overridevirtual

Fetch domains stored in ledger.

Returns
list of domains in insertion to ledger order Fetch number of domains in ledger
number of domains in ledger

Implements iroha::ametsuchi::WsvQuery.

◆ countTransactions()

iroha::expected::Result< size_t, std::string > iroha::ametsuchi::RocksDBWsvQuery::countTransactions ( )
overridevirtual

Fetch number of valid transactions in ledger.

Returns
number of transactions in ledger

Implements iroha::ametsuchi::WsvQuery.

◆ getPeerByPublicKey()

boost::optional< std::shared_ptr< shared_model::interface::Peer > > iroha::ametsuchi::RocksDBWsvQuery::getPeerByPublicKey ( shared_model::interface::types::PublicKeyHexStringView  public_key)
overridevirtual

Fetch peer with given public key from ledger

Returns
the peer if found, none otherwise

Implements iroha::ametsuchi::WsvQuery.

◆ getPeers()

boost::optional< std::vector< std::shared_ptr< shared_model::interface::Peer > > > iroha::ametsuchi::RocksDBWsvQuery::getPeers ( )
overridevirtual

Fetch peers stored in ledger

Returns
list of peers in insertion to ledger order

Implements iroha::ametsuchi::WsvQuery.

Here is the call graph for this function:

◆ getSignatories()

boost::optional< std::vector< std::string > > iroha::ametsuchi::RocksDBWsvQuery::getSignatories ( const shared_model::interface::types::AccountIdType account_id)
overridevirtual

Get signatories of account by user account_id

Parameters
account_id
Returns

Implements iroha::ametsuchi::WsvQuery.

Here is the call graph for this function:

◆ getTopBlockInfo()

iroha::expected::Result< iroha::TopBlockInfo, std::string > iroha::ametsuchi::RocksDBWsvQuery::getTopBlockInfo ( ) const
overridevirtual

Get top block info from ledger state.

Implements iroha::ametsuchi::WsvQuery.

Here is the call graph for this function:
Here is the caller graph for this function:

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