Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Use storage::exists host function instead of ::get. #7445

Merged
merged 2 commits into from
Oct 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frame/support/src/storage/unhashed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn take_or_else<T: Decode + Sized, F: FnOnce() -> T>(key: &[u8], default_val

/// Check to see if `key` has an explicit entry in storage.
pub fn exists(key: &[u8]) -> bool {
sp_io::storage::read(key, &mut [0;0][..], 0).is_some()
sp_io::storage::exists(key)
}

/// Ensure `key` has no explicit entry in storage.
Expand Down