From 62ee43d82223f13f6ba8a30a114ba162d6a27e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Tue, 21 Dec 2021 18:36:46 +0100 Subject: [PATCH] Use exists host function (#10531) --- substrate/frame/support/src/storage/child.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/substrate/frame/support/src/storage/child.rs b/substrate/frame/support/src/storage/child.rs index 4b237aaa56..5497f64206 100644 --- a/substrate/frame/support/src/storage/child.rs +++ b/substrate/frame/support/src/storage/child.rs @@ -112,8 +112,7 @@ pub fn take_or_else 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), } }