bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 643 forks source link

Add `history_api::get_block_operations_by_time` API #2651

Closed abitmore closed 1 year ago

abitmore commented 1 year ago

PR for #2498.

Add history_api::get_block_operations_by_time API:

/**
 * @brief Get all operations, including virtual operations, within the most recent block
 *        (no later than the specified time) containing at least one operation
 * @param start time point, optional, if omitted, the data of the latest block containing at least
 *              one operation will be returned
 * @return a list of @a operation_history objects ordered by ID in descending order
 *
 * @note the data is fetched from the @a account_history plugin, so results may be
 *       incomplete or incorrect due to the @a partial-operations option configured in the API node.
 *       To get complete data, it is recommended to query from ElasticSearch where the data is
 *       maintained by the @a elastic_search plugin.
 */
vector<operation_history_object> get_block_operations_by_time(
   const optional<fc::time_point_sec>& start = optional<fc::time_point_sec>() ) const;
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication