Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain_apis::account_query_db Class Reference

#include <account_query_db.hpp>

Classes

struct  get_accounts_by_authorizers_params
 
struct  get_accounts_by_authorizers_result
 

Public Member Functions

 account_query_db (const class sysio::chain::controller &chain)
 
 ~account_query_db ()
 
 account_query_db (account_query_db &&)
 
account_query_dboperator= (account_query_db &&)
 
void cache_transaction_trace (const chain::transaction_trace_ptr &trace)
 
void commit_block (const chain::block_state_ptr &block)
 
get_accounts_by_authorizers_result get_accounts_by_authorizers (const get_accounts_by_authorizers_params &args) const
 

Detailed Description

This class manages the ephemeral indices and data that provide the get_accounts_by_authorizers RPC call There is no persistence and the indices/caches are recreated when the class is instantiated based on the current state of the chain.

Definition at line 12 of file account_query_db.hpp.

Constructor & Destructor Documentation

◆ account_query_db() [1/2]

sysio::chain_apis::account_query_db::account_query_db ( const class sysio::chain::controller & chain)

Instantiate a new account query DB from the given chain controller The caller is expected to manage lifetimes such that this controller reference does not go stale for the life of the account query DB

Parameters
chain- controller to read data from

◆ ~account_query_db()

sysio::chain_apis::account_query_db::~account_query_db ( )
default

◆ account_query_db() [2/2]

sysio::chain_apis::account_query_db::account_query_db ( account_query_db && )

Allow moving the account query DB (including by assignment)

Member Function Documentation

◆ cache_transaction_trace()

void sysio::chain_apis::account_query_db::cache_transaction_trace ( const chain::transaction_trace_ptr & trace)

Add a transaction trace to the account query DB that has been applied to the contoller even though it may not yet be committed to by a block.

Parameters
trace

Definition at line 517 of file account_query_db.cpp.

517 {
518 try {
519 _impl->cache_transaction_trace(trace);
520 } FC_LOG_AND_DROP(("ACCOUNT DB cache_transaction_trace ERROR"));
521 }
#define FC_LOG_AND_DROP(...)

◆ commit_block()

void sysio::chain_apis::account_query_db::commit_block ( const chain::block_state_ptr & block)

Add a block to the account query DB, committing all the cached traces it represents and dumping any uncommitted traces.

Parameters
block

Definition at line 523 of file account_query_db.cpp.

523 {
524 try {
525 _impl->commit_block(block);
526 } FC_LOG_AND_DROP(("ACCOUNT DB commit_block ERROR"));
527 }

◆ get_accounts_by_authorizers()

account_query_db::get_accounts_by_authorizers_result sysio::chain_apis::account_query_db::get_accounts_by_authorizers ( const get_accounts_by_authorizers_params & args) const

Given a set of account names and public keys, find all account permission authorities that are, in part or whole, satisfiable.

Parameters
args
Returns

Definition at line 529 of file account_query_db.cpp.

529 {
530 return _impl->get_accounts_by_authorizers(args);
531 }

◆ operator=()

account_query_db & sysio::chain_apis::account_query_db::operator= ( account_query_db && )
default

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