Frame remove_all with size limit. (#9106)

* remove prefixed content with limit.

* test match

* factor comment and factor ext limit removal.

* fix benchmark

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
cheme
2021-06-15 15:23:58 +02:00
committed by GitHub
parent 5f0257f3b3
commit 693b39f43b
36 changed files with 312 additions and 239 deletions
@@ -260,12 +260,13 @@ impl<'a, S, H> Backend<H> for ProvingBackend<'a, S, H>
self.0.child_storage(child_info, key)
}
fn apply_to_child_keys_while<F: FnMut(&[u8]) -> bool>(
fn apply_to_keys_while<F: FnMut(&[u8]) -> bool>(
&self,
child_info: &ChildInfo,
child_info: Option<&ChildInfo>,
prefix: Option<&[u8]>,
f: F,
) {
self.0.apply_to_child_keys_while(child_info, f)
self.0.apply_to_keys_while(child_info, prefix, f)
}
fn next_storage_key(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error> {