BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Public Attributes | List of all members
graphene::app::database_api_impl Class Reference

#include <database_api_impl.hxx>

Inheritance diagram for graphene::app::database_api_impl:

Public Member Functions

 database_api_impl (graphene::chain::database &db, const application_options *app_options)
 
virtual ~database_api_impl ()
 
fc::variants get_objects (const vector< object_id_type > &ids, optional< bool > subscribe) const
 
void set_subscribe_callback (std::function< void(const variant &)> cb, bool notify_remove_create)
 
void set_auto_subscription (bool enable)
 
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 (bool reset_callback, bool reset_market_subscriptions)
 
optional< block_headerget_block_header (uint32_t block_num) const
 
map< uint32_t, optional< block_header > > get_block_header_batch (const vector< uint32_t > block_nums) const
 
optional< signed_blockget_block (uint32_t block_num) const
 
processed_transaction get_transaction (uint32_t block_num, uint32_t trx_in_block) const
 
chain_property_object get_chain_properties () const
 
global_property_object get_global_properties () const
 
fc::variant_object get_config () const
 
chain_id_type get_chain_id () const
 
dynamic_global_property_object get_dynamic_global_properties () const
 
vector< flat_set< account_id_type > > get_key_references (vector< public_key_type > key) const
 
bool is_public_key_registered (string public_key) const
 
account_id_type get_account_id_from_string (const std::string &name_or_id) const
 
vector< optional< account_object > > get_accounts (const vector< std::string > &account_names_or_ids, optional< bool > subscribe) const
 
std::map< string, full_accountget_full_accounts (const vector< string > &names_or_ids, optional< bool > subscribe)
 
optional< account_objectget_account_by_name (string name) const
 
vector< account_id_type > get_account_references (const std::string account_id_or_name) const
 
vector< optional< account_object > > lookup_account_names (const vector< string > &account_names) const
 
map< string, account_id_type > lookup_accounts (const string &lower_bound_name, uint32_t limit, optional< bool > subscribe) const
 
uint64_t get_account_count () const
 
vector< assetget_account_balances (const std::string &account_name_or_id, const flat_set< asset_id_type > &assets) const
 
vector< assetget_named_account_balances (const std::string &name, const flat_set< asset_id_type > &assets) const
 
vector< balance_objectget_balance_objects (const vector< address > &addrs) const
 
vector< assetget_vested_balances (const vector< balance_id_type > &objs) const
 
vector< vesting_balance_objectget_vesting_balances (const std::string account_id_or_name) const
 
uint64_t get_asset_count () const
 
asset_id_type get_asset_id_from_string (const std::string &symbol_or_id) const
 
vector< optional< extended_asset_object > > get_assets (const vector< std::string > &asset_symbols_or_ids, optional< bool > subscribe) const
 
vector< extended_asset_objectlist_assets (const string &lower_bound_symbol, uint32_t limit) const
 
vector< optional< extended_asset_object > > lookup_asset_symbols (const vector< string > &symbols_or_ids) const
 
vector< extended_asset_objectget_assets_by_issuer (const std::string &issuer_name_or_id, asset_id_type start, uint32_t limit) const
 
vector< limit_order_objectget_limit_orders (const std::string &a, const std::string &b, uint32_t limit) const
 
vector< limit_order_objectget_limit_orders_by_account (const string &account_name_or_id, optional< uint32_t > limit, optional< limit_order_id_type > start_id)
 
vector< limit_order_objectget_account_limit_orders (const string &account_name_or_id, const string &base, const string &quote, uint32_t limit, optional< limit_order_id_type > ostart_id, optional< price > ostart_price)
 
vector< call_order_objectget_call_orders (const std::string &a, uint32_t limit) const
 
vector< call_order_objectget_call_orders_by_account (const std::string &account_name_or_id, asset_id_type start, uint32_t limit) const
 
vector< force_settlement_objectget_settle_orders (const std::string &a, uint32_t limit) const
 
vector< force_settlement_objectget_settle_orders_by_account (const std::string &account_name_or_id, force_settlement_id_type start, uint32_t limit) const
 
vector< call_order_objectget_margin_positions (const std::string account_id_or_name) const
 
vector< collateral_bid_objectget_collateral_bids (const std::string &asset, uint32_t limit, uint32_t start) const
 
void subscribe_to_market (std::function< void(const variant &)> callback, const std::string &a, const std::string &b)
 
void unsubscribe_from_market (const std::string &a, const std::string &b)
 
market_ticker get_ticker (const string &base, const string &quote, bool skip_order_book=false) const
 
market_volume get_24_volume (const string &base, const string &quote) const
 
order_book get_order_book (const string &base, const string &quote, unsigned limit=50) const
 
vector< market_tickerget_top_markets (uint32_t limit) const
 
vector< market_tradeget_trade_history (const string &base, const string &quote, fc::time_point_sec start, fc::time_point_sec stop, unsigned limit=100) const
 
vector< market_tradeget_trade_history_by_sequence (const string &base, const string &quote, int64_t start, fc::time_point_sec stop, unsigned limit=100) const
 
vector< optional< witness_object > > get_witnesses (const vector< witness_id_type > &witness_ids) const
 
fc::optional< witness_objectget_witness_by_account (const std::string account_id_or_name) const
 
map< string, witness_id_type > lookup_witness_accounts (const string &lower_bound_name, uint32_t limit) const
 
uint64_t get_witness_count () const
 
vector< optional< committee_member_object > > get_committee_members (const vector< committee_member_id_type > &committee_member_ids) const
 
fc::optional< committee_member_objectget_committee_member_by_account (const std::string account_id_or_name) const
 
map< string, committee_member_id_type > lookup_committee_member_accounts (const string &lower_bound_name, uint32_t limit) const
 
uint64_t get_committee_count () const
 
vector< worker_objectget_all_workers (const optional< bool > is_expired=optional< bool >()) const
 
vector< worker_objectget_workers_by_account (const std::string account_id_or_name) const
 
uint64_t get_worker_count () const
 
vector< variant > lookup_vote_ids (const vector< vote_id_type > &votes) const
 
std::string get_transaction_hex (const signed_transaction &trx) const
 
std::string get_transaction_hex_without_sig (const signed_transaction &trx) const
 
set< public_key_type > get_required_signatures (const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const
 
set< public_key_type > get_potential_signatures (const signed_transaction &trx) const
 
set< address > get_potential_address_signatures (const signed_transaction &trx) const
 
bool verify_authority (const signed_transaction &trx) const
 
bool verify_account_authority (const string &account_name_or_id, const flat_set< public_key_type > &signers) const
 
processed_transaction validate_transaction (const signed_transaction &trx) const
 
vector< fc::variantget_required_fees (const vector< operation > &ops, const std::string &asset_id_or_symbol) const
 
vector< proposal_objectget_proposed_transactions (const std::string account_id_or_name) const
 
vector< blinded_balance_objectget_blinded_balances (const flat_set< commitment_type > &commitments) const
 
vector< withdraw_permission_objectget_withdraw_permissions_by_giver (const std::string account_id_or_name, withdraw_permission_id_type start, uint32_t limit) const
 
vector< withdraw_permission_objectget_withdraw_permissions_by_recipient (const std::string account_id_or_name, withdraw_permission_id_type start, uint32_t limit) const
 
optional< htlc_objectget_htlc (htlc_id_type id, optional< bool > subscribe) const
 
vector< htlc_objectget_htlc_by_from (const std::string account_id_or_name, htlc_id_type start, uint32_t limit) const
 
vector< htlc_objectget_htlc_by_to (const std::string account_id_or_name, htlc_id_type start, uint32_t limit) const
 
vector< htlc_objectlist_htlcs (const htlc_id_type lower_bound_id, uint32_t limit) const
 
const account_objectget_account_from_string (const std::string &name_or_id, bool throw_if_not_found=true) const
 
template<class ASSET >
extended_asset_object extend_asset (ASSET &&a) const
 
const asset_objectget_asset_from_string (const std::string &symbol_or_id, bool throw_if_not_found=true) const
 
vector< optional< extended_asset_object > > get_assets (const vector< asset_id_type > &asset_ids, optional< bool > subscribe=optional< bool >()) const
 
vector< limit_order_objectget_limit_orders (const asset_id_type a, const asset_id_type b, const uint32_t limit) const
 
bool get_whether_to_subscribe (optional< bool > subscribe) const
 
vector< char > get_subscription_key (const object_id_type &item) const
 
template<typename T >
void subscribe_to_item (const T &item) const
 
template<typename T >
bool is_subscribed_to_item (const T &item) const
 
bool is_impacted_account (const flat_set< account_id_type > &accounts)
 
template<typename T >
const std::pair< asset_id_type, asset_id_type > get_order_market (const T &order)
 
const std::pair< asset_id_type, asset_id_type > get_order_market (const force_settlement_object &order)
 
template<typename T >
void enqueue_if_subscribed_to_market (const object *obj, market_queue_type &queue, bool full_object=true)
 
void broadcast_updates (const vector< variant > &updates)
 
void broadcast_market_updates (const market_queue_type &queue)
 
void handle_object_changed (bool force_notify, bool full_object, const vector< object_id_type > &ids, const flat_set< account_id_type > &impacted_accounts, std::function< const object *(object_id_type id)> find_object)
 
void on_objects_new (const vector< object_id_type > &ids, const flat_set< account_id_type > &impacted_accounts)
 
void on_objects_changed (const vector< object_id_type > &ids, const flat_set< account_id_type > &impacted_accounts)
 
void on_objects_removed (const vector< object_id_type > &ids, const vector< const object * > &objs, const flat_set< account_id_type > &impacted_accounts)
 
void on_applied_block ()
 

Public Attributes

bool _notify_remove_create = false
 
bool _enabled_auto_subscription = true
 
fc::bloom_filter _subscribe_filter
 
std::set< account_id_type > _subscribed_accounts
 
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
 
boost::signals2::scoped_connection _new_connection
 
boost::signals2::scoped_connection _change_connection
 
boost::signals2::scoped_connection _removed_connection
 
boost::signals2::scoped_connection _applied_block_connection
 
boost::signals2::scoped_connection _pending_trx_connection
 
map< pair< asset_id_type, asset_id_type >, std::function< void(const variant &)> > _market_subscriptions
 
graphene::chain::database_db
 
const application_options_app_options = nullptr
 
const graphene::api_helper_indexes::amount_in_collateral_indexamount_in_collateral_index
 

Detailed Description

Definition at line 36 of file database_api_impl.hxx.

Constructor & Destructor Documentation

graphene::app::database_api_impl::database_api_impl ( graphene::chain::database db,
const application_options app_options 
)
explicit

Definition at line 55 of file database_api.cpp.

graphene::app::database_api_impl::~database_api_impl ( )
virtual

Definition at line 89 of file database_api.cpp.

Member Function Documentation

void graphene::app::database_api_impl::broadcast_market_updates ( const market_queue_type queue)

Definition at line 2667 of file database_api.cpp.

void graphene::app::database_api_impl::broadcast_updates ( const vector< variant > &  updates)

Definition at line 2656 of file database_api.cpp.

void graphene::app::database_api_impl::cancel_all_subscriptions ( bool  reset_callback,
bool  reset_market_subscriptions 
)

Definition at line 186 of file database_api.cpp.

template<typename T >
void graphene::app::database_api_impl::enqueue_if_subscribed_to_market ( const object *  obj,
market_queue_type queue,
bool  full_object = true 
)
inline

Definition at line 313 of file database_api_impl.hxx.

template<class ASSET >
extended_asset_object graphene::app::database_api_impl::extend_asset ( ASSET &&  a) const
inline

Definition at line 214 of file database_api_impl.hxx.

market_volume graphene::app::database_api_impl::get_24_volume ( const string &  base,
const string &  quote 
) const

Definition at line 1395 of file database_api.cpp.

vector< asset > graphene::app::database_api_impl::get_account_balances ( const std::string &  account_name_or_id,
const flat_set< asset_id_type > &  assets 
) const

Definition at line 759 of file database_api.cpp.

optional< account_object > graphene::app::database_api_impl::get_account_by_name ( string  name) const

Definition at line 648 of file database_api.cpp.

uint64_t graphene::app::database_api_impl::get_account_count ( ) const

Definition at line 742 of file database_api.cpp.

const account_object * graphene::app::database_api_impl::get_account_from_string ( const std::string &  name_or_id,
bool  throw_if_not_found = true 
) const

Definition at line 2549 of file database_api.cpp.

account_id_type graphene::app::database_api_impl::get_account_id_from_string ( const std::string &  name_or_id) const
vector< limit_order_object > graphene::app::database_api_impl::get_account_limit_orders ( const string &  account_name_or_id,
const string &  base,
const string &  quote,
uint32_t  limit,
optional< limit_order_id_type >  ostart_id,
optional< price >  ostart_price 
)

Definition at line 1060 of file database_api.cpp.

vector< account_id_type > graphene::app::database_api_impl::get_account_references ( const std::string  account_id_or_name) const

Definition at line 662 of file database_api.cpp.

vector< optional< account_object > > graphene::app::database_api_impl::get_accounts ( const vector< std::string > &  account_names_or_ids,
optional< bool >  subscribe 
) const

Definition at line 440 of file database_api.cpp.

vector< worker_object > graphene::app::database_api_impl::get_all_workers ( const optional< bool >  is_expired = optional<bool>()) const

Definition at line 1895 of file database_api.cpp.

uint64_t graphene::app::database_api_impl::get_asset_count ( ) const

Definition at line 929 of file database_api.cpp.

const asset_object * graphene::app::database_api_impl::get_asset_from_string ( const std::string &  symbol_or_id,
bool  throw_if_not_found = true 
) const

Definition at line 2569 of file database_api.cpp.

asset_id_type graphene::app::database_api_impl::get_asset_id_from_string ( const std::string &  symbol_or_id) const
vector< optional< extended_asset_object > > graphene::app::database_api_impl::get_assets ( const vector< std::string > &  asset_symbols_or_ids,
optional< bool >  subscribe 
) const

Definition at line 877 of file database_api.cpp.

vector< optional< extended_asset_object > > graphene::app::database_api_impl::get_assets ( const vector< asset_id_type > &  asset_ids,
optional< bool >  subscribe = optional<bool>() 
) const

Definition at line 2590 of file database_api.cpp.

vector< extended_asset_object > graphene::app::database_api_impl::get_assets_by_issuer ( const std::string &  issuer_name_or_id,
asset_id_type  start,
uint32_t  limit 
) const

Definition at line 940 of file database_api.cpp.

vector< balance_object > graphene::app::database_api_impl::get_balance_objects ( const vector< address > &  addrs) const

Definition at line 796 of file database_api.cpp.

vector< blinded_balance_object > graphene::app::database_api_impl::get_blinded_balances ( const flat_set< commitment_type > &  commitments) const

Definition at line 2350 of file database_api.cpp.

optional< signed_block > graphene::app::database_api_impl::get_block ( uint32_t  block_num) const

Definition at line 239 of file database_api.cpp.

optional< block_header > graphene::app::database_api_impl::get_block_header ( uint32_t  block_num) const

Definition at line 211 of file database_api.cpp.

map< uint32_t, optional< block_header > > graphene::app::database_api_impl::get_block_header_batch ( const vector< uint32_t >  block_nums) const

Definition at line 223 of file database_api.cpp.

vector< call_order_object > graphene::app::database_api_impl::get_call_orders ( const std::string &  a,
uint32_t  limit 
) const

Definition at line 1150 of file database_api.cpp.

vector< call_order_object > graphene::app::database_api_impl::get_call_orders_by_account ( const std::string &  account_name_or_id,
asset_id_type  start,
uint32_t  limit 
) const

Definition at line 1179 of file database_api.cpp.

chain_id_type graphene::app::database_api_impl::get_chain_id ( ) const

Definition at line 307 of file database_api.cpp.

chain_property_object graphene::app::database_api_impl::get_chain_properties ( ) const

Definition at line 277 of file database_api.cpp.

vector< collateral_bid_object > graphene::app::database_api_impl::get_collateral_bids ( const std::string &  asset,
uint32_t  limit,
uint32_t  start 
) const

Definition at line 1292 of file database_api.cpp.

uint64_t graphene::app::database_api_impl::get_committee_count ( ) const

Definition at line 1878 of file database_api.cpp.

fc::optional< committee_member_object > graphene::app::database_api_impl::get_committee_member_by_account ( const std::string  account_id_or_name) const

Definition at line 1827 of file database_api.cpp.

vector< optional< committee_member_object > > graphene::app::database_api_impl::get_committee_members ( const vector< committee_member_id_type > &  committee_member_ids) const

Definition at line 1808 of file database_api.cpp.

fc::variant_object graphene::app::database_api_impl::get_config ( ) const

Definition at line 297 of file database_api.cpp.

dynamic_global_property_object graphene::app::database_api_impl::get_dynamic_global_properties ( ) const

Definition at line 317 of file database_api.cpp.

std::map< std::string, full_account > graphene::app::database_api_impl::get_full_accounts ( const vector< string > &  names_or_ids,
optional< bool >  subscribe 
)

Definition at line 464 of file database_api.cpp.

global_property_object graphene::app::database_api_impl::get_global_properties ( ) const

Definition at line 287 of file database_api.cpp.

fc::optional< htlc_object > graphene::app::database_api_impl::get_htlc ( htlc_id_type  id,
optional< bool >  subscribe 
) const

Definition at line 2449 of file database_api.cpp.

vector< htlc_object > graphene::app::database_api_impl::get_htlc_by_from ( const std::string  account_id_or_name,
htlc_id_type  start,
uint32_t  limit 
) const

Definition at line 2465 of file database_api.cpp.

vector< htlc_object > graphene::app::database_api_impl::get_htlc_by_to ( const std::string  account_id_or_name,
htlc_id_type  start,
uint32_t  limit 
) const

Definition at line 2495 of file database_api.cpp.

vector< flat_set< account_id_type > > graphene::app::database_api_impl::get_key_references ( vector< public_key_type >  keys) const
Returns
all accounts that referr to the key or account id in their owner or active authorities.

Definition at line 336 of file database_api.cpp.

vector< limit_order_object > graphene::app::database_api_impl::get_limit_orders ( const std::string &  a,
const std::string &  b,
uint32_t  limit 
) const

Definition at line 998 of file database_api.cpp.

vector< limit_order_object > graphene::app::database_api_impl::get_limit_orders ( const asset_id_type  a,
const asset_id_type  b,
const uint32_t  limit 
) const

Definition at line 2609 of file database_api.cpp.

vector< limit_order_object > graphene::app::database_api_impl::get_limit_orders_by_account ( const string &  account_name_or_id,
optional< uint32_t >  limit,
optional< limit_order_id_type >  start_id 
)

Definition at line 1019 of file database_api.cpp.

vector< call_order_object > graphene::app::database_api_impl::get_margin_positions ( const std::string  account_id_or_name) const

Definition at line 1267 of file database_api.cpp.

vector<asset> graphene::app::database_api_impl::get_named_account_balances ( const std::string &  name,
const flat_set< asset_id_type > &  assets 
) const
fc::variants graphene::app::database_api_impl::get_objects ( const vector< object_id_type > &  ids,
optional< bool >  subscribe 
) const

Definition at line 105 of file database_api.cpp.

order_book graphene::app::database_api_impl::get_order_book ( const string &  base,
const string &  quote,
unsigned  limit = 50 
) const

Definition at line 1414 of file database_api.cpp.

template<typename T >
const std::pair<asset_id_type,asset_id_type> graphene::app::database_api_impl::get_order_market ( const T &  order)
inline

Definition at line 297 of file database_api_impl.hxx.

const std::pair<asset_id_type,asset_id_type> graphene::app::database_api_impl::get_order_market ( const force_settlement_object order)
inline

Definition at line 303 of file database_api_impl.hxx.

set< address > graphene::app::database_api_impl::get_potential_address_signatures ( const signed_transaction &  trx) const

Definition at line 2129 of file database_api.cpp.

set< public_key_type > graphene::app::database_api_impl::get_potential_signatures ( const signed_transaction &  trx) const

Definition at line 2090 of file database_api.cpp.

vector< proposal_object > graphene::app::database_api_impl::get_proposed_transactions ( const std::string  account_id_or_name) const

Definition at line 2314 of file database_api.cpp.

vector< fc::variant > graphene::app::database_api_impl::get_required_fees ( const vector< operation > &  ops,
const std::string &  asset_id_or_symbol 
) const

Definition at line 2280 of file database_api.cpp.

set< public_key_type > graphene::app::database_api_impl::get_required_signatures ( const signed_transaction &  trx,
const flat_set< public_key_type > &  available_keys 
) const

Definition at line 2065 of file database_api.cpp.

vector< force_settlement_object > graphene::app::database_api_impl::get_settle_orders ( const std::string &  a,
uint32_t  limit 
) const

Definition at line 1206 of file database_api.cpp.

vector< force_settlement_object > graphene::app::database_api_impl::get_settle_orders_by_account ( const std::string &  account_name_or_id,
force_settlement_id_type  start,
uint32_t  limit 
) const

Definition at line 1237 of file database_api.cpp.

vector<char> graphene::app::database_api_impl::get_subscription_key ( const object_id_type &  item) const
inline

Definition at line 264 of file database_api_impl.hxx.

market_ticker graphene::app::database_api_impl::get_ticker ( const string &  base,
const string &  quote,
bool  skip_order_book = false 
) const

Definition at line 1361 of file database_api.cpp.

vector< market_ticker > graphene::app::database_api_impl::get_top_markets ( uint32_t  limit) const

Definition at line 1466 of file database_api.cpp.

vector< market_trade > graphene::app::database_api_impl::get_trade_history ( const string &  base,
const string &  quote,
fc::time_point_sec  start,
fc::time_point_sec  stop,
unsigned  limit = 100 
) const

Definition at line 1503 of file database_api.cpp.

vector< market_trade > graphene::app::database_api_impl::get_trade_history_by_sequence ( const string &  base,
const string &  quote,
int64_t  start,
fc::time_point_sec  stop,
unsigned  limit = 100 
) const

Definition at line 1605 of file database_api.cpp.

processed_transaction graphene::app::database_api_impl::get_transaction ( uint32_t  block_num,
uint32_t  trx_in_block 
) const

Definition at line 258 of file database_api.cpp.

std::string graphene::app::database_api_impl::get_transaction_hex ( const signed_transaction &  trx) const

Definition at line 2042 of file database_api.cpp.

std::string graphene::app::database_api_impl::get_transaction_hex_without_sig ( const signed_transaction &  trx) const

Definition at line 2053 of file database_api.cpp.

vector< asset > graphene::app::database_api_impl::get_vested_balances ( const vector< balance_id_type > &  objs) const

Definition at line 824 of file database_api.cpp.

vector< vesting_balance_object > graphene::app::database_api_impl::get_vesting_balances ( const std::string  account_id_or_name) const

Definition at line 842 of file database_api.cpp.

bool graphene::app::database_api_impl::get_whether_to_subscribe ( optional< bool >  subscribe) const
inline

Definition at line 246 of file database_api_impl.hxx.

vector< withdraw_permission_object > graphene::app::database_api_impl::get_withdraw_permissions_by_giver ( const std::string  account_id_or_name,
withdraw_permission_id_type  start,
uint32_t  limit 
) const

Definition at line 2379 of file database_api.cpp.

vector< withdraw_permission_object > graphene::app::database_api_impl::get_withdraw_permissions_by_recipient ( const std::string  account_id_or_name,
withdraw_permission_id_type  start,
uint32_t  limit 
) const

Definition at line 2413 of file database_api.cpp.

fc::optional< witness_object > graphene::app::database_api_impl::get_witness_by_account ( const std::string  account_id_or_name) const

Definition at line 1741 of file database_api.cpp.

uint64_t graphene::app::database_api_impl::get_witness_count ( ) const

Definition at line 1791 of file database_api.cpp.

vector< optional< witness_object > > graphene::app::database_api_impl::get_witnesses ( const vector< witness_id_type > &  witness_ids) const

Definition at line 1724 of file database_api.cpp.

uint64_t graphene::app::database_api_impl::get_worker_count ( ) const

Definition at line 1947 of file database_api.cpp.

vector< worker_object > graphene::app::database_api_impl::get_workers_by_account ( const std::string  account_id_or_name) const

Definition at line 1928 of file database_api.cpp.

void graphene::app::database_api_impl::handle_object_changed ( bool  force_notify,
bool  full_object,
const vector< object_id_type > &  ids,
const flat_set< account_id_type > &  impacted_accounts,
std::function< const object *(object_id_type id)>  find_object 
)

Definition at line 2717 of file database_api.cpp.

bool graphene::app::database_api_impl::is_impacted_account ( const flat_set< account_id_type > &  accounts)

Definition at line 2646 of file database_api.cpp.

bool graphene::app::database_api_impl::is_public_key_registered ( string  public_key) const

Definition at line 394 of file database_api.cpp.

template<typename T >
bool graphene::app::database_api_impl::is_subscribed_to_item ( const T &  item) const
inline

Definition at line 283 of file database_api_impl.hxx.

vector< extended_asset_object > graphene::app::database_api_impl::list_assets ( const string &  lower_bound_symbol,
uint32_t  limit 
) const

Definition at line 901 of file database_api.cpp.

vector< htlc_object > graphene::app::database_api_impl::list_htlcs ( const htlc_id_type  lower_bound_id,
uint32_t  limit 
) const

Definition at line 2524 of file database_api.cpp.

vector< optional< account_object > > graphene::app::database_api_impl::lookup_account_names ( const vector< string > &  account_names) const

Definition at line 688 of file database_api.cpp.

map< string, account_id_type > graphene::app::database_api_impl::lookup_accounts ( const string &  lower_bound_name,
uint32_t  limit,
optional< bool >  subscribe 
) const

Definition at line 708 of file database_api.cpp.

vector< optional< extended_asset_object > > graphene::app::database_api_impl::lookup_asset_symbols ( const vector< string > &  symbols_or_ids) const

Definition at line 968 of file database_api.cpp.

map< string, committee_member_id_type > graphene::app::database_api_impl::lookup_committee_member_accounts ( const string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 1844 of file database_api.cpp.

vector< variant > graphene::app::database_api_impl::lookup_vote_ids ( const vector< vote_id_type > &  votes) const

Definition at line 1965 of file database_api.cpp.

map< string, witness_id_type > graphene::app::database_api_impl::lookup_witness_accounts ( const string &  lower_bound_name,
uint32_t  limit 
) const

Definition at line 1757 of file database_api.cpp.

void graphene::app::database_api_impl::on_applied_block ( )

note: this method cannot yield because it is called in the middle of apply a block.

we need to ensure the database_api is not deleted for the life of the async operation

Definition at line 2779 of file database_api.cpp.

void graphene::app::database_api_impl::on_objects_changed ( const vector< object_id_type > &  ids,
const flat_set< account_id_type > &  impacted_accounts 
)

Definition at line 2709 of file database_api.cpp.

void graphene::app::database_api_impl::on_objects_new ( const vector< object_id_type > &  ids,
const flat_set< account_id_type > &  impacted_accounts 
)

called every time a block is applied to report the objects that were changed

Definition at line 2701 of file database_api.cpp.

void graphene::app::database_api_impl::on_objects_removed ( const vector< object_id_type > &  ids,
const vector< const object * > &  objs,
const flat_set< account_id_type > &  impacted_accounts 
)

Definition at line 2683 of file database_api.cpp.

void graphene::app::database_api_impl::set_auto_subscription ( bool  enable)

Definition at line 156 of file database_api.cpp.

void graphene::app::database_api_impl::set_block_applied_callback ( std::function< void(const variant &block_id)>  cb)

Definition at line 176 of file database_api.cpp.

void graphene::app::database_api_impl::set_pending_transaction_callback ( std::function< void(const variant &)>  cb)

Definition at line 166 of file database_api.cpp.

void graphene::app::database_api_impl::set_subscribe_callback ( std::function< void(const variant &)>  cb,
bool  notify_remove_create 
)

Definition at line 137 of file database_api.cpp.

template<typename T >
void graphene::app::database_api_impl::subscribe_to_item ( const T &  item) const
inline

Definition at line 270 of file database_api_impl.hxx.

void graphene::app::database_api_impl::subscribe_to_market ( std::function< void(const variant &)>  callback,
const std::string &  a,
const std::string &  b 
)

Definition at line 1330 of file database_api.cpp.

void graphene::app::database_api_impl::unsubscribe_from_market ( const std::string &  a,
const std::string &  b 
)

Definition at line 1346 of file database_api.cpp.

processed_transaction graphene::app::database_api_impl::validate_transaction ( const signed_transaction &  trx) const

Definition at line 2213 of file database_api.cpp.

bool graphene::app::database_api_impl::verify_account_authority ( const string &  account_name_or_id,
const flat_set< public_key_type > &  signers 
) const

Definition at line 2182 of file database_api.cpp.

bool graphene::app::database_api_impl::verify_authority ( const signed_transaction &  trx) const

Definition at line 2163 of file database_api.cpp.

Member Data Documentation

const application_options* graphene::app::database_api_impl::_app_options = nullptr

Definition at line 364 of file database_api_impl.hxx.

boost::signals2::scoped_connection graphene::app::database_api_impl::_applied_block_connection

Definition at line 358 of file database_api_impl.hxx.

std::function<void(const fc::variant&)> graphene::app::database_api_impl::_block_applied_callback

Definition at line 353 of file database_api_impl.hxx.

boost::signals2::scoped_connection graphene::app::database_api_impl::_change_connection

Definition at line 356 of file database_api_impl.hxx.

graphene::chain::database& graphene::app::database_api_impl::_db

Definition at line 363 of file database_api_impl.hxx.

bool graphene::app::database_api_impl::_enabled_auto_subscription = true

Definition at line 346 of file database_api_impl.hxx.

map< pair<asset_id_type,asset_id_type>, std::function<void(const variant&)> > graphene::app::database_api_impl::_market_subscriptions

Definition at line 361 of file database_api_impl.hxx.

boost::signals2::scoped_connection graphene::app::database_api_impl::_new_connection

Definition at line 355 of file database_api_impl.hxx.

bool graphene::app::database_api_impl::_notify_remove_create = false

Definition at line 345 of file database_api_impl.hxx.

std::function<void(const fc::variant&)> graphene::app::database_api_impl::_pending_trx_callback

Definition at line 352 of file database_api_impl.hxx.

boost::signals2::scoped_connection graphene::app::database_api_impl::_pending_trx_connection

Definition at line 359 of file database_api_impl.hxx.

boost::signals2::scoped_connection graphene::app::database_api_impl::_removed_connection

Definition at line 357 of file database_api_impl.hxx.

std::function<void(const fc::variant&)> graphene::app::database_api_impl::_subscribe_callback

Definition at line 351 of file database_api_impl.hxx.

fc::bloom_filter graphene::app::database_api_impl::_subscribe_filter
mutable

Definition at line 348 of file database_api_impl.hxx.

std::set<account_id_type> graphene::app::database_api_impl::_subscribed_accounts

Definition at line 349 of file database_api_impl.hxx.

const graphene::api_helper_indexes::amount_in_collateral_index* graphene::app::database_api_impl::amount_in_collateral_index

Definition at line 366 of file database_api_impl.hxx.


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