mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-29 06:59:49 +00:00
srml: system: add kill_prefix (#3729)
* srml: system: add kill_prefix * node: bump spec_version
This commit is contained in:
1 parent
c545344c60
commit
facf31f77e
2 files changed
+9
-2
No files matched your search
@@ -278,6 +278,13 @@ decl_module! {
|
||||
storage::unhashed::kill(&key);
|
||||
}
|
||||
}
|
||||
|
||||
/// Kill all storage items with a key that starts with the given prefix.
|
||||
#[weight = SimpleDispatchInfo::FixedOperational(10_000)]
|
||||
fn kill_prefix(origin, prefix: Key) {
|
||||
ensure_root(origin)?;
|
||||
storage::unhashed::kill_prefix(&prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user