aptos-core
aptos-core copied to clipboard
[storage] add pagination in get_state_values_by_key_prefix() signature
Description
add prev_key
and limit
as paramters to get_state_values_by_key_prefix
to support pagination.
return prev_key
as a second returning value.
When there is no more items to return, the returned prev_key
would be None
.
the passed-in prev_key
is the last key visited previously. pass None
in when call it the first time.
Test Plan
ut
Commandeer.
It seems I can stamp this PR after I took it over. So cool.
Due to too much changes, I re-submit the PR with #5353