Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add history_api::get_account_history_by_time API #2650

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented Oct 4, 2022

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.

@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2022

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