mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 18:37:59 +00:00
Make sure to use the optimized method instead of reading the storage. (#7445)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user