Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
graphene::app::database_api_impl Class Reference
Inheritance diagram for graphene::app::database_api_impl:

Public Member Functions

 database_api_impl (graphene::chain::database &db, const application_options *app_options)
 
 ~database_api_impl ()
 
fc::variants get_objects (const vector< object_id_type > &ids) const
 
void set_subscribe_callback (std::function< void(const variant &)> cb, bool notify_remove_create)
 
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< vector< 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) const
 
std::map< string, full_accountget_full_accounts (const vector< string > &names_or_ids, bool subscribe)
 
optional< account_objectget_account_by_name (string name) const
 
vector< account_id_typeget_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_typelookup_accounts (const string &lower_bound_name, uint32_t limit) 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
 
vector< optional< asset_object > > get_assets (const vector< asset_id_type > &asset_ids) const
 
vector< asset_objectlist_assets (const string &lower_bound_symbol, uint32_t limit) const
 
vector< optional< asset_object > > lookup_asset_symbols (const vector< string > &symbols_or_ids) const
 
uint64_t get_asset_count () const
 
vector< limit_order_objectget_limit_orders (asset_id_type a, asset_id_type b, uint32_t limit) const
 
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 (asset_id_type a, uint32_t limit) const
 
vector< force_settlement_objectget_settle_orders (asset_id_type a, 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 asset_id_type asset, uint32_t limit, uint32_t start) const
 
void subscribe_to_market (std::function< void(const variant &)> callback, asset_id_type a, asset_id_type b)
 
void unsubscribe_from_market (asset_id_type a, asset_id_type 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_volumeget_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_typelookup_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_typelookup_committee_member_accounts (const string &lower_bound_name, uint32_t limit) const
 
uint64_t get_committee_count () const
 
vector< worker_objectget_all_workers () const
 
vector< optional< worker_object > > get_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_typeget_required_signatures (const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const
 
set< public_key_typeget_potential_signatures (const signed_transaction &trx) const
 
set< addressget_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::variant > get_required_fees (const vector< operation > &ops, asset_id_type id) 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
 
template<typename T >
void subscribe_to_item (const T &i) const
 
template<typename T >
bool is_subscribed_to_item (const T &i) const
 
bool is_impacted_account (const flat_set< account_id_type > &accounts)
 
const std::pair< asset_id_type, asset_id_typeget_order_market (const force_settlement_object &order)
 
const account_objectget_account_from_string (const std::string &name_or_id) const
 
template<typename T >
const std::pair< asset_id_type, asset_id_typeget_order_market (const T &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 ()
 

Static Public Member Functions

static string price_to_string (const price &_price, const asset_object &_base, const asset_object &_quote)
 

Public Attributes

bool _notify_remove_create = false
 
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
 

Detailed Description

Definition at line 50 of file database_api.cpp.

Constructor & Destructor Documentation

◆ database_api_impl()

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

Definition at line 289 of file database_api.cpp.

◆ ~database_api_impl()

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

Definition at line 309 of file database_api.cpp.

Member Function Documentation

◆ broadcast_market_updates()

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

Definition at line 2299 of file database_api.cpp.

◆ broadcast_updates()

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

Definition at line 2288 of file database_api.cpp.

◆ cancel_all_subscriptions()

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

Definition at line 400 of file database_api.cpp.

◆ enqueue_if_subscribed_to_market()

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 237 of file database_api.cpp.

◆ get_24_volume()

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

Definition at line 1375 of file database_api.cpp.

◆ get_account_balances()

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 949 of file database_api.cpp.

◆ get_account_by_name()

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

Definition at line 856 of file database_api.cpp.

◆ get_account_count()

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

Definition at line 933 of file database_api.cpp.

◆ get_account_from_string()

const account_object* graphene::app::database_api_impl::get_account_from_string ( const std::string &  name_or_id) const
inline

Definition at line 212 of file database_api.cpp.

◆ get_account_id_from_string()

account_id_type graphene::app::database_api_impl::get_account_id_from_string ( const std::string &  name_or_id) const

◆ get_account_limit_orders()

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 672 of file database_api.cpp.

◆ get_account_references()

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

Definition at line 870 of file database_api.cpp.

◆ get_accounts()

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

Definition at line 648 of file database_api.cpp.

◆ get_all_workers()

vector< worker_object > graphene::app::database_api_impl::get_all_workers ( ) const

Definition at line 1825 of file database_api.cpp.

◆ get_asset_count()

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

Definition at line 1100 of file database_api.cpp.

◆ get_assets()

vector< optional< asset_object > > graphene::app::database_api_impl::get_assets ( const vector< asset_id_type > &  asset_ids) const

Definition at line 1057 of file database_api.cpp.

◆ get_balance_objects()

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

Definition at line 983 of file database_api.cpp.

◆ get_blinded_balances()

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

Definition at line 2218 of file database_api.cpp.

◆ get_block()

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

Definition at line 452 of file database_api.cpp.

◆ get_block_header()

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

Definition at line 425 of file database_api.cpp.

◆ get_block_header_batch()

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 437 of file database_api.cpp.

◆ get_call_orders()

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

Definition at line 1176 of file database_api.cpp.

◆ get_chain_id()

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

Definition at line 520 of file database_api.cpp.

◆ get_chain_properties()

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

Definition at line 490 of file database_api.cpp.

◆ get_collateral_bids()

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

Definition at line 1243 of file database_api.cpp.

◆ get_committee_count()

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

Definition at line 1808 of file database_api.cpp.

◆ get_committee_member_by_account()

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 1765 of file database_api.cpp.

◆ get_committee_members()

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 1748 of file database_api.cpp.

◆ get_config()

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

Definition at line 510 of file database_api.cpp.

◆ get_dynamic_global_properties()

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

Definition at line 530 of file database_api.cpp.

◆ get_full_accounts()

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

Definition at line 757 of file database_api.cpp.

◆ get_global_properties()

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

Definition at line 500 of file database_api.cpp.

◆ get_key_references()

vector< vector< 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 549 of file database_api.cpp.

◆ get_limit_orders()

vector< limit_order_object > graphene::app::database_api_impl::get_limit_orders ( asset_id_type  a,
asset_id_type  b,
uint32_t  limit 
) const
Returns
the limit orders for both sides of the book for the two assets specified up to limit number on each side.

Definition at line 1142 of file database_api.cpp.

◆ get_margin_positions()

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

Definition at line 1219 of file database_api.cpp.

◆ get_named_account_balances()

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

◆ get_objects()

fc::variants graphene::app::database_api_impl::get_objects ( const vector< object_id_type > &  ids) const

Definition at line 325 of file database_api.cpp.

◆ get_order_book()

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

Definition at line 1394 of file database_api.cpp.

◆ get_order_market() [1/2]

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 203 of file database_api.cpp.

◆ get_order_market() [2/2]

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 231 of file database_api.cpp.

◆ get_potential_address_signatures()

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

Definition at line 2027 of file database_api.cpp.

◆ get_potential_signatures()

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

Definition at line 1992 of file database_api.cpp.

◆ get_proposed_transactions()

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

TODO: add secondary index that will accelerate this process

Definition at line 2189 of file database_api.cpp.

◆ get_required_fees()

vector< fc::variant > graphene::app::database_api_impl::get_required_fees ( const vector< operation > &  ops,
asset_id_type  id 
) const

Definition at line 2155 of file database_api.cpp.

◆ get_required_signatures()

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 1973 of file database_api.cpp.

◆ get_settle_orders()

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

Definition at line 1198 of file database_api.cpp.

◆ get_ticker()

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

Definition at line 1303 of file database_api.cpp.

◆ get_top_markets()

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

Definition at line 1439 of file database_api.cpp.

◆ get_trade_history()

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 1476 of file database_api.cpp.

◆ get_trade_history_by_sequence()

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 1566 of file database_api.cpp.

◆ get_transaction()

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

Definition at line 471 of file database_api.cpp.

◆ get_transaction_hex()

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

Definition at line 1951 of file database_api.cpp.

◆ get_transaction_hex_without_sig()

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

Definition at line 1962 of file database_api.cpp.

◆ get_vested_balances()

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

Definition at line 1012 of file database_api.cpp.

◆ get_vesting_balances()

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

Definition at line 1030 of file database_api.cpp.

◆ get_withdraw_permissions_by_giver()

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 2243 of file database_api.cpp.

◆ get_withdraw_permissions_by_recipient()

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 2265 of file database_api.cpp.

◆ get_witness_by_account()

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

Definition at line 1689 of file database_api.cpp.

◆ get_witness_count()

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

Definition at line 1732 of file database_api.cpp.

◆ get_witnesses()

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

Definition at line 1672 of file database_api.cpp.

◆ get_worker_count()

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

Definition at line 1860 of file database_api.cpp.

◆ get_workers_by_account()

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

Definition at line 1841 of file database_api.cpp.

◆ handle_object_changed()

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 2345 of file database_api.cpp.

◆ is_impacted_account()

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

Definition at line 193 of file database_api.cpp.

◆ is_public_key_registered()

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

Definition at line 608 of file database_api.cpp.

◆ is_subscribed_to_item()

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

Definition at line 185 of file database_api.cpp.

◆ list_assets()

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

Definition at line 1077 of file database_api.cpp.

◆ lookup_account_names()

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

Definition at line 892 of file database_api.cpp.

◆ lookup_accounts()

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

Definition at line 910 of file database_api.cpp.

◆ lookup_asset_symbols()

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

Definition at line 1110 of file database_api.cpp.

◆ lookup_committee_member_accounts()

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 1780 of file database_api.cpp.

◆ lookup_vote_ids()

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

Definition at line 1878 of file database_api.cpp.

◆ lookup_witness_accounts()

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 1704 of file database_api.cpp.

◆ on_applied_block()

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 2402 of file database_api.cpp.

◆ on_objects_changed()

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 2338 of file database_api.cpp.

◆ on_objects_new()

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 2331 of file database_api.cpp.

◆ on_objects_removed()

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 2315 of file database_api.cpp.

◆ price_to_string()

string graphene::app::database_api_impl::price_to_string ( const price _price,
const asset_object _base,
const asset_object _quote 
)
static

Definition at line 1288 of file database_api.cpp.

◆ set_block_applied_callback()

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

Definition at line 390 of file database_api.cpp.

◆ set_pending_transaction_callback()

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

Definition at line 380 of file database_api.cpp.

◆ set_subscribe_callback()

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

Definition at line 361 of file database_api.cpp.

◆ subscribe_to_item()

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

Definition at line 174 of file database_api.cpp.

◆ subscribe_to_market()

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

Definition at line 1269 of file database_api.cpp.

◆ unsubscribe_from_market()

void graphene::app::database_api_impl::unsubscribe_from_market ( asset_id_type  a,
asset_id_type  b 
)

Definition at line 1281 of file database_api.cpp.

◆ validate_transaction()

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

Definition at line 2089 of file database_api.cpp.

◆ verify_account_authority()

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

reuse trx.verify_authority by creating a dummy transfer

Definition at line 2071 of file database_api.cpp.

◆ verify_authority()

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

Definition at line 2057 of file database_api.cpp.

Member Data Documentation

◆ _app_options

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

Definition at line 274 of file database_api.cpp.

◆ _applied_block_connection

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

Definition at line 270 of file database_api.cpp.

◆ _block_applied_callback

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

Definition at line 265 of file database_api.cpp.

◆ _change_connection

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

Definition at line 268 of file database_api.cpp.

◆ _db

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

Definition at line 273 of file database_api.cpp.

◆ _market_subscriptions

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

Definition at line 272 of file database_api.cpp.

◆ _new_connection

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

Definition at line 267 of file database_api.cpp.

◆ _notify_remove_create

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

Definition at line 260 of file database_api.cpp.

◆ _pending_trx_callback

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

Definition at line 264 of file database_api.cpp.

◆ _pending_trx_connection

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

Definition at line 271 of file database_api.cpp.

◆ _removed_connection

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

Definition at line 269 of file database_api.cpp.

◆ _subscribe_callback

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

Definition at line 263 of file database_api.cpp.

◆ _subscribe_filter

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

Definition at line 261 of file database_api.cpp.

◆ _subscribed_accounts

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

Definition at line 262 of file database_api.cpp.


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