Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
echevrier committed Jun 29, 2023
1 parent e6d287e commit 1ef87fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/api/rpc_api/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ where
.get_storage_keys_paged(storage_key_prefix.clone(), new_count, new_key, at_block)
.await?;
storage_keys.append(&mut keys);
if keys.len() < STORAGE_KEYS_PAGED_MAX_COUNT as usize {
break
}
still_todo -= new_count;
new_key = keys.last().map(|x| x.to_owned());
}
Expand Down
3 changes: 1 addition & 2 deletions testing/examples/state_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ async fn main() {
let storage_keys = api
.get_all_storage_keys_paged_up_to_count(Some(storage_key_prefix), max_keys, None, None)
.unwrap();
assert!(storage_keys.len() as u32 > 3);
assert!(storage_keys.len() as u32 <= max_keys);
assert!(storage_keys.len() as u32 = 8);

let max_keys = 20;
let storage_keys = api.get_storage_keys_paged(None, max_keys.clone(), None, None).unwrap();
Expand Down

0 comments on commit 1ef87fc

Please sign in to comment.