mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 06:55:42 +00:00
srml: system: add kill_prefix (#3729)
* srml: system: add kill_prefix * node: bump spec_version
This commit is contained in:
committed by
Bastian Köcher
parent
c545344c60
commit
facf31f77e
@@ -84,8 +84,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
// and set impl_version to equal spec_version. If only runtime
|
// and set impl_version to equal spec_version. If only runtime
|
||||||
// implementation changes and behavior does not, then leave spec_version as
|
// implementation changes and behavior does not, then leave spec_version as
|
||||||
// is and increment impl_version.
|
// is and increment impl_version.
|
||||||
spec_version: 166,
|
spec_version: 167,
|
||||||
impl_version: 166,
|
impl_version: 167,
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -278,6 +278,13 @@ decl_module! {
|
|||||||
storage::unhashed::kill(&key);
|
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