Golos
Разработчикам Статистика Баунти Документация Партнеры Github
Public Member Functions | Public Attributes | List of all members
golos::application::database_api_impl Class Reference
Inheritance diagram for golos::application::database_api_impl:

Public Member Functions

 database_api_impl (const golos::application::api_context &ctx)
 
 ~database_api_impl ()
 
void set_subscribe_callback (std::function< void(const variant &)> cb, bool clear_filter)
 
void set_pending_transaction_callback (std::function< void(const variant &)> cb)
 
void set_block_applied_callback (std::function< void(const variant &block_id)> cb)
 
void cancel_all_subscriptions ()
 
optional< block_header > get_block_header (uint32_t block_num) const
 
optional< signed_block > get_block (uint32_t block_num) const
 
std::vector< applied_operationget_ops_in_block (uint32_t block_num, bool only_virtual) const
 
fc::variant_object get_config () const
 
dynamic_global_property_object get_dynamic_global_properties () const
 
std::vector< extended_accountget_accounts (std::vector< std::string > names) const
 
std::vector< optional< account_api_obj > > lookup_account_names (const std::vector< std::string > &account_names) const
 
std::set< std::string > lookup_accounts (const std::string &lower_bound_name, uint32_t limit) const
 
uint64_t get_account_count () const
 
std::vector< optional< witness_api_obj > > get_witnesses (const std::vector< witness_object::id_type > &witness_ids) const
 
fc::optional< witness_api_objget_witness_by_account (std::string account_name) const
 
std::set< account_name_type > lookup_witness_accounts (const std::string &lower_bound_name, uint32_t limit) const
 
uint64_t get_witness_count () const
 
vector< asset< 0, 17, 0 > > get_account_balances (account_name_type account_name, const flat_set< asset_name_type > &assets) const
 
vector< optional< asset_object > > get_assets (const vector< asset_name_type > &asset_symbols) const
 
vector< optional< asset_object > > get_assets_by_issuer (string issuer) const
 
vector< optional< asset_dynamic_data_object > > get_assets_dynamic_data (const vector< asset_name_type > &asset_symbols) const
 
vector< optional< asset_bitasset_data_object > > get_bitassets_data (const vector< asset_name_type > &asset_symbols) const
 
vector< asset_objectlist_assets (const asset_name_type &lower_bound_symbol, uint32_t limit) const
 
std::string get_transaction_hex (const signed_transaction &trx) const
 
std::set< public_key_type > get_required_signatures (const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const
 
std::set< public_key_type > get_potential_signatures (const signed_transaction &trx) const
 
bool verify_authority (const signed_transaction &trx) const
 
bool verify_account_authority (const std::string &name_or_id, const flat_set< public_key_type > &signers) const
 
vector< proposal_objectget_proposed_transactions (account_name_type name) const
 
template<typename T >
void subscribe_to_item (const T &i) const
 
template<typename T >
bool is_subscribed_to_item (const T &i) const
 
void on_applied_block (const chain::signed_block &b)
 

Public Attributes

fc::bloom_filter _subscribe_filter
 
std::function< void(const fc::variant &)> _subscribe_callback
 
std::function< void(const fc::variant &)> _pending_trx_callback
 
std::function< void(const fc::variant &)> _block_applied_callback
 
golos::chain::database_db
 
std::shared_ptr< golos::follow::follow_api_follow_api
 
boost::signals2::scoped_connection _block_applied_connection
 
map< pair< asset_symbol_type, asset_symbol_type >, std::function< void(const variant &)> > _market_subscriptions
 

Detailed Description

Definition at line 29 of file database_api.cpp.

Constructor & Destructor Documentation

◆ database_api_impl()

golos::application::database_api_impl::database_api_impl ( const golos::application::api_context ctx)

Definition at line 237 of file database_api.cpp.

◆ ~database_api_impl()

golos::application::database_api_impl::~database_api_impl ( )

Definition at line 249 of file database_api.cpp.

Member Function Documentation

◆ cancel_all_subscriptions()

void golos::application::database_api_impl::cancel_all_subscriptions ( )

Definition at line 221 of file database_api.cpp.

◆ get_account_balances()

vector< asset< 0, 17, 0 > > golos::application::database_api_impl::get_account_balances ( account_name_type  account_name,
const flat_set< asset_name_type > &  assets 
) const

Definition at line 693 of file database_api.cpp.

◆ get_account_count()

uint64_t golos::application::database_api_impl::get_account_count ( ) const

Definition at line 467 of file database_api.cpp.

◆ get_accounts()

std::vector< extended_account > golos::application::database_api_impl::get_accounts ( std::vector< std::string >  names) const

Definition at line 391 of file database_api.cpp.

◆ get_assets()

vector< optional< asset_object > > golos::application::database_api_impl::get_assets ( const vector< asset_name_type > &  asset_symbols) const

Definition at line 725 of file database_api.cpp.

◆ get_assets_by_issuer()

vector< optional< asset_object > > golos::application::database_api_impl::get_assets_by_issuer ( string  issuer) const

Definition at line 746 of file database_api.cpp.

◆ get_assets_dynamic_data()

vector< optional< asset_dynamic_data_object > > golos::application::database_api_impl::get_assets_dynamic_data ( const vector< asset_name_type > &  asset_symbols) const

Definition at line 762 of file database_api.cpp.

◆ get_bitassets_data()

vector< optional< asset_bitasset_data_object > > golos::application::database_api_impl::get_bitassets_data ( const vector< asset_name_type > &  asset_symbols) const

Definition at line 784 of file database_api.cpp.

◆ get_block()

optional< signed_block > golos::application::database_api_impl::get_block ( uint32_t  block_num) const

Definition at line 282 of file database_api.cpp.

◆ get_block_header()

optional< block_header > golos::application::database_api_impl::get_block_header ( uint32_t  block_num) const

Definition at line 268 of file database_api.cpp.

◆ get_config()

fc::variant_object golos::application::database_api_impl::get_config ( ) const

Definition at line 325 of file database_api.cpp.

◆ get_dynamic_global_properties()

dynamic_global_property_object golos::application::database_api_impl::get_dynamic_global_properties ( ) const

Definition at line 353 of file database_api.cpp.

◆ get_ops_in_block()

std::vector< applied_operation > golos::application::database_api_impl::get_ops_in_block ( uint32_t  block_num,
bool  only_virtual 
) const

Definition at line 292 of file database_api.cpp.

◆ get_potential_signatures()

std::set< public_key_type > golos::application::database_api_impl::get_potential_signatures ( const signed_transaction &  trx) const

Definition at line 869 of file database_api.cpp.

◆ get_proposed_transactions()

vector< proposal_object > golos::application::database_api_impl::get_proposed_transactions ( account_name_type  name) const

TODO: add secondary index that will accelerate this process

Definition at line 2379 of file database_api.cpp.

◆ get_required_signatures()

std::set< public_key_type > golos::application::database_api_impl::get_required_signatures ( const signed_transaction &  trx,
const flat_set< public_key_type > &  available_keys 
) const

Definition at line 848 of file database_api.cpp.

◆ get_transaction_hex()

std::string golos::application::database_api_impl::get_transaction_hex ( const signed_transaction &  trx) const

Definition at line 837 of file database_api.cpp.

◆ get_witness_by_account()

fc::optional< witness_api_obj > golos::application::database_api_impl::get_witness_by_account ( std::string  account_name) const

Definition at line 633 of file database_api.cpp.

◆ get_witness_count()

uint64_t golos::application::database_api_impl::get_witness_count ( ) const

Definition at line 678 of file database_api.cpp.

◆ get_witnesses()

std::vector< optional< witness_api_obj > > golos::application::database_api_impl::get_witnesses ( const std::vector< witness_object::id_type > &  witness_ids) const

Definition at line 587 of file database_api.cpp.

◆ is_subscribed_to_item()

template<typename T >
bool golos::application::database_api_impl::is_subscribed_to_item ( const T &  i) const
inline

Definition at line 124 of file database_api.cpp.

◆ list_assets()

vector< asset_object > golos::application::database_api_impl::list_assets ( const asset_name_type &  lower_bound_symbol,
uint32_t  limit 
) const

Definition at line 806 of file database_api.cpp.

◆ lookup_account_names()

std::vector< optional< account_api_obj > > golos::application::database_api_impl::lookup_account_names ( const std::vector< std::string > &  account_names) const

Definition at line 423 of file database_api.cpp.

◆ lookup_accounts()

std::set< std::string > golos::application::database_api_impl::lookup_accounts ( const std::string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 447 of file database_api.cpp.

◆ lookup_witness_accounts()

std::set< account_name_type > golos::application::database_api_impl::lookup_witness_accounts ( const std::string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 649 of file database_api.cpp.

◆ on_applied_block()

void golos::application::database_api_impl::on_applied_block ( const chain::signed_block &  b)

Definition at line 202 of file database_api.cpp.

◆ set_block_applied_callback()

void golos::application::database_api_impl::set_block_applied_callback ( std::function< void(const variant &block_id)>  cb)

Definition at line 210 of file database_api.cpp.

◆ set_pending_transaction_callback()

void golos::application::database_api_impl::set_pending_transaction_callback ( std::function< void(const variant &)>  cb)

Definition at line 192 of file database_api.cpp.

◆ set_subscribe_callback()

void golos::application::database_api_impl::set_subscribe_callback ( std::function< void(const variant &)>  cb,
bool  clear_filter 
)

Definition at line 174 of file database_api.cpp.

◆ subscribe_to_item()

template<typename T >
void golos::application::database_api_impl::subscribe_to_item ( const T &  i) const
inline

Definition at line 111 of file database_api.cpp.

◆ verify_account_authority()

bool golos::application::database_api_impl::verify_account_authority ( const std::string &  name_or_id,
const flat_set< public_key_type > &  signers 
) const

reuse trx.verify_authority by creating a dummy transfer

Definition at line 922 of file database_api.cpp.

◆ verify_authority()

bool golos::application::database_api_impl::verify_authority ( const signed_transaction &  trx) const

Definition at line 904 of file database_api.cpp.

Member Data Documentation

◆ _block_applied_callback

std::function<void(const fc::variant &)> golos::application::database_api_impl::_block_applied_callback

Definition at line 138 of file database_api.cpp.

◆ _block_applied_connection

boost::signals2::scoped_connection golos::application::database_api_impl::_block_applied_connection

Definition at line 143 of file database_api.cpp.

◆ _db

golos::chain::database& golos::application::database_api_impl::_db

Definition at line 140 of file database_api.cpp.

◆ _follow_api

std::shared_ptr<golos::follow::follow_api> golos::application::database_api_impl::_follow_api

Definition at line 141 of file database_api.cpp.

◆ _market_subscriptions

map<pair<asset_symbol_type, asset_symbol_type>, std::function<void(const variant &)> > golos::application::database_api_impl::_market_subscriptions

Definition at line 145 of file database_api.cpp.

◆ _pending_trx_callback

std::function<void(const fc::variant &)> golos::application::database_api_impl::_pending_trx_callback

Definition at line 137 of file database_api.cpp.

◆ _subscribe_callback

std::function<void(const fc::variant &)> golos::application::database_api_impl::_subscribe_callback

Definition at line 136 of file database_api.cpp.

◆ _subscribe_filter

fc::bloom_filter golos::application::database_api_impl::_subscribe_filter
mutable

Definition at line 135 of file database_api.cpp.


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