mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Use exists host function (#10531)
This commit is contained in:
committed by
GitHub
parent
9c9ea8da85
commit
62ee43d822
@@ -112,8 +112,7 @@ pub fn take_or_else<T: Codec + Sized, F: FnOnce() -> T>(
|
||||
pub fn exists(child_info: &ChildInfo, key: &[u8]) -> bool {
|
||||
match child_info.child_type() {
|
||||
ChildType::ParentKeyId =>
|
||||
sp_io::default_child_storage::read(child_info.storage_key(), key, &mut [0; 0][..], 0)
|
||||
.is_some(),
|
||||
sp_io::default_child_storage::exists(child_info.storage_key(), key),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user