Draft: Limits for nft_get_all_tokens #771

Closed
timur.5 wants to merge 3 commits from feature/limit-NFT-objs-returned into develop
2 changed files with 2 additions and 1 deletions
Showing only changes of commit a8060a0ca6 - Show all commits

View file

@ -3111,6 +3111,7 @@ vector<nft_object> database_api_impl::nft_get_all_tokens(const nft_id_type lower
FC_ASSERT(limit <= api_limit_nft_tokens,
"Number of querying nft tokens can not be greater than ${configured_limit}",
("configured_limit", api_limit_nft_tokens));
const auto &idx_nft = _db.get_index_type<nft_index>().indices().get<by_id>();
vector<nft_object> result;
result.reserve(limit);

View file

@ -2572,7 +2572,7 @@ class wallet_api
/**
* @brief Returns all tokens
* @param limit the maximum number of NFT objects to return (max: 100)
* @param lowerbound the symbol of the first NFT object to include in the list.
* @param lowerbound token_id the symbol of the first NFT object to include in the list.
* @return Returns vector of NFT objects, empty vector if none
*/
vector<nft_object> nft_get_all_tokens(uint32_t limit, optional<nft_id_type> lower_id) const;