From 1ef87fcb60800551663ee2acfffc31817e0dbb88 Mon Sep 17 00:00:00 2001 From: echevrier Date: Thu, 29 Jun 2023 17:50:37 +0200 Subject: [PATCH] improve --- src/api/rpc_api/state.rs | 3 --- testing/examples/state_tests.rs | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/api/rpc_api/state.rs b/src/api/rpc_api/state.rs index efc584abd..6101bb30b 100644 --- a/src/api/rpc_api/state.rs +++ b/src/api/rpc_api/state.rs @@ -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()); } diff --git a/testing/examples/state_tests.rs b/testing/examples/state_tests.rs index 9a1fd64cd..6fe823e5a 100644 --- a/testing/examples/state_tests.rs +++ b/testing/examples/state_tests.rs @@ -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();