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
@@ -136,7 +136,7 @@ impl<'a, H: Hasher, B: 'a + Backend<H>> Externalities for ReadOnlyExternalities<
unimplemented!("kill_child_storage is not supported in ReadOnlyExternalities")
}
fn clear_prefix(&mut self, _prefix: &[u8]) {
fn clear_prefix(&mut self, _prefix: &[u8], _limit: Option<u32>) -> (bool, u32) {
unimplemented!("clear_prefix is not supported in ReadOnlyExternalities")
}
@@ -144,7 +144,8 @@ impl<'a, H: Hasher, B: 'a + Backend<H>> Externalities for ReadOnlyExternalities<
&mut self,
_child_info: &ChildInfo,
_prefix: &[u8],
) {
_limit: Option<u32>,
) -> (bool, u32) {
unimplemented!("clear_child_prefix is not supported in ReadOnlyExternalities")
}