DECENT
Functions

Functions

vector< optional< miner_object > > graphene::app::database_api::get_miners (const vector< miner_id_type > &miner_ids) const
 Get a list of miners by ID. More...
 
fc::optional< miner_object > graphene::app::database_api::get_miner_by_account (account_id_type account) const
 Get the miner owned by a given account. More...
 
map< string, miner_id_type > graphene::app::database_api::lookup_miner_accounts (const string &lower_bound_name, uint32_t limit) const
 Get names and IDs for registered miners. More...
 
uint64_t graphene::app::database_api::get_miner_count () const
 Get the total number of miners registered with the blockchain. More...
 
multimap< time_point_sec, price_feed > graphene::app::database_api::get_feeds_by_miner (const account_id_type account_id, const uint32_t count) const
 Get a list of published price feeds by a miner. More...
 
share_type graphene::app::database_api::get_miner_pay_from_fees_by_block_time (fc::time_point_sec block_time) const
 Get miner pay from accumulated fees from given time. More...
 
share_type graphene::app::database_api::get_new_asset_per_block () const
 Returns a reward for a miner from the most recent block. More...
 
share_type graphene::app::database_api::get_asset_per_block_by_block_num (uint32_t block_num) const
 Returns a reward for a miner from a specified block. More...
 
vector< optional< miner_object > > graphene::app::database_api::lookup_vote_ids (const vector< vote_id_type > &votes) const
 Given a set of votes, return the objects they are voting for. More...
 
vector< database::votes_gained > graphene::app::database_api::get_actual_votes () const
 Get the number of votes each miner actually has. More...
 
vector< miner_voting_info > graphene::app::database_api::search_miner_voting (const string &account_id, const string &term, bool only_my_votes, const string &order, const string &id, uint32_t count) const
 Get miner voting info list by account that match search term. More...
 

Detailed Description

Function Documentation

vector< database::votes_gained > graphene::app::database_api::get_actual_votes ( ) const

Get the number of votes each miner actually has.

Returns
a list mapping account names to the number of votes

Definition at line 2657 of file database_api.cpp.

share_type graphene::app::database_api::get_asset_per_block_by_block_num ( uint32_t  block_num) const

Returns a reward for a miner from a specified block.

Note
A reward from transaction fees is not included.
Parameters
block_numthe block number
Returns
amount of newly generated DCT

Definition at line 2627 of file database_api.cpp.

multimap< time_point_sec, price_feed > graphene::app::database_api::get_feeds_by_miner ( const account_id_type  account_id,
const uint32_t  count 
) const

Get a list of published price feeds by a miner.

Parameters
account_idid of the account
countmaximum number of price feeds to fetch (must not exceed 100)
Returns
a list of price feeds published by the miner
Exceptions
limit_exceeded_exception

Definition at line 1298 of file database_api.cpp.

fc::optional< miner_object > graphene::app::database_api::get_miner_by_account ( account_id_type  account) const

Get the miner owned by a given account.

Parameters
accountthe ID of the account whose miner should be retrieved
Returns
the miner object, or null if the account does not have a miner

Definition at line 1245 of file database_api.cpp.

uint64_t graphene::app::database_api::get_miner_count ( ) const

Get the total number of miners registered with the blockchain.

Returns
the total number of registered miners

Definition at line 1288 of file database_api.cpp.

share_type graphene::app::database_api::get_miner_pay_from_fees_by_block_time ( fc::time_point_sec  block_time) const

Get miner pay from accumulated fees from given time.

Parameters
block_timereference time
Returns
miner pay from accumulated fees

Definition at line 2647 of file database_api.cpp.

vector< optional< miner_object > > graphene::app::database_api::get_miners ( const vector< miner_id_type > &  miner_ids) const

Get a list of miners by ID.

Note
This function has semantics identical to get_objects().
Parameters
miner_idsIDs of the miners to retrieve
Returns
the miners corresponding to the provided IDs

Definition at line 1234 of file database_api.cpp.

share_type graphene::app::database_api::get_new_asset_per_block ( ) const

Returns a reward for a miner from the most recent block.

Returns
amount of newly generated DCT

Definition at line 2617 of file database_api.cpp.

map< string, miner_id_type > graphene::app::database_api::lookup_miner_accounts ( const string &  lower_bound_name,
uint32_t  limit 
) const

Get names and IDs for registered miners.

Parameters
lower_bound_namelower bound of the first name to return
limitmaximum number of results to return ( must not exceed 1000 )
Returns
map of miner names to corresponding IDs
Exceptions
limit_exceeded_exception

Definition at line 1259 of file database_api.cpp.

vector< optional< miner_object > > graphene::app::database_api::lookup_vote_ids ( const vector< vote_id_type > &  votes) const

Given a set of votes, return the objects they are voting for.

Note
The results will be in the same order as the votes. null will be returned for any vote ids that are not found.
Parameters
votesset of votes
Exceptions
limit_exceeded_exception

Definition at line 1332 of file database_api.cpp.

vector< miner_voting_info > graphene::app::database_api::search_miner_voting ( const string &  account_id,
const string &  term,
bool  only_my_votes,
const string &  order,
const string &  id,
uint32_t  count 
) const

Get miner voting info list by account that match search term.

Parameters
account_idaccount name or id or empty when search without account
termsearch term - miner name
only_my_voteswhen true it selects only votes given by account
orderorder field. Available options are 'name|link|votes'
idthe id of the miner to start searching from, or empty when start from beginning
countmaximum number of miners info to fetch (must not exceed 1000)
Returns
the list of miner voting info found

Definition at line 1366 of file database_api.cpp.