mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 02:37:58 +00:00
Forward port blake2 storage support (#2360)
* move storage maps to blake2_128 (#2268) * remove default hash, introduce twox_128 and blake2 * use blake2_128 & create ext_blake2_128 * refactor code * add benchmark * factorize generator * fix * parameterizable hasher * some fix * fix * fix * fix * metadata * fix * remove debug print * map -> blake2_256 * fix test * fix test * Apply suggestions from code review Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * impl twox 128 concat (#2353) * impl twox_128_concat * comment addressed * fix * impl twox_128->64_concat * fix test * Fix compilation and cleanup some docs * Apply suggestions from code review Co-Authored-By: bkchr <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Gavin Wood
parent
21d1ee4e99
commit
f0862606b7
@@ -16,10 +16,14 @@
|
||||
|
||||
pub use srml_metadata::{
|
||||
DecodeDifferent, FnEncode, RuntimeMetadata,
|
||||
ModuleMetadata, RuntimeMetadataV3,
|
||||
ModuleMetadata, RuntimeMetadataV4,
|
||||
DefaultByteGetter, RuntimeMetadataPrefixed,
|
||||
StorageMetadata, StorageFunctionMetadata,
|
||||
StorageFunctionType, StorageFunctionModifier,
|
||||
DefaultByte, StorageHasher
|
||||
};
|
||||
|
||||
|
||||
/// Implements the metadata support for the given runtime and all its modules.
|
||||
///
|
||||
/// Example:
|
||||
@@ -36,8 +40,8 @@ macro_rules! impl_runtime_metadata {
|
||||
) => {
|
||||
impl $runtime {
|
||||
pub fn metadata() -> $crate::metadata::RuntimeMetadataPrefixed {
|
||||
$crate::metadata::RuntimeMetadata::V3 (
|
||||
$crate::metadata::RuntimeMetadataV3 {
|
||||
$crate::metadata::RuntimeMetadata::V4 (
|
||||
$crate::metadata::RuntimeMetadataV4 {
|
||||
modules: $crate::__runtime_modules_to_metadata!($runtime;; $( $rest )*),
|
||||
}
|
||||
).into()
|
||||
@@ -377,8 +381,8 @@ mod tests {
|
||||
event_module2::Module with Event Storage Call,
|
||||
);
|
||||
|
||||
const EXPECTED_METADATA: RuntimeMetadata = RuntimeMetadata::V3(
|
||||
RuntimeMetadataV3 {
|
||||
const EXPECTED_METADATA: RuntimeMetadata = RuntimeMetadata::V4(
|
||||
RuntimeMetadataV4 {
|
||||
modules: DecodeDifferent::Encode(&[
|
||||
ModuleMetadata {
|
||||
name: DecodeDifferent::Encode("system"),
|
||||
|
||||
Reference in New Issue
Block a user