Skip to content

Add history_api::get_account_history_by_time API#2650

Merged
abitmore merged 2 commits into
developfrom
pr-2647-get-account-history-by-time
Oct 4, 2022
Merged

Add history_api::get_account_history_by_time API#2650
abitmore merged 2 commits into
developfrom
pr-2647-get-account-history-by-time

Conversation

@abitmore

@abitmore abitmore commented Oct 4, 2022

Copy link
Copy Markdown
Member

PR for #2647.

Add history_api::get_account_history_by_time API,

/**
 * @brief Get the history of operations related to the specified account no later than the specified time
 * @param account_name_or_id The account name or ID whose history should be queried
 * @param limit Maximum number of operations to retrieve, must not exceed the configured value of
 *              @a api_limit_get_account_history
 * @param start the time point to start looping back through history
 * @return A list of operations related to the specified account, ordered from most recent to oldest.
 *
 * @note
 * 1. If @p account_name_or_id cannot be tied to an account, an empty list will be returned
 * 2. @p limit can be omitted or be @a null, if so the configured value of
 *       @a api_limit_get_account_history will be used
 * 3. @p start can be omitted or be @a null, if so the api will return the "first page" of the history
 * 4. One or more optional parameters can be omitted from the end of the parameter list, and the optional
 *    parameters in the middle cannot be omitted (but can be @a null).
 */
vector<operation_history_object> get_account_history_by_time(
   const std::string& account_name_or_id,
   const optional<uint32_t>& limit = optional<uint32_t>(),
   const optional<fc::time_point_sec>& start = optional<fc::time_point_sec>()
)const;

and refactor history_api::get_account_history by the way.

@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2022

Copy link
Copy Markdown

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 3 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@abitmore
abitmore merged commit c6c2aac into develop Oct 4, 2022
@abitmore
abitmore deleted the pr-2647-get-account-history-by-time branch October 4, 2022 17:34
@abitmore abitmore linked an issue Oct 4, 2022 that may be closed by this pull request
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API to get account history by time

1 participant