From aa74d7a6441a56c366e2a0e36d0956dbdd40ff39 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 13 Jul 2021 11:18:00 +0100 Subject: [PATCH] Add `additional_signed` field for `SignedExtension` payload data (#19) * Add `SignedExtensionMetadata::additional_signed` field for signed payload data * Fmt --- frame-metadata/src/v14.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frame-metadata/src/v14.rs b/frame-metadata/src/v14.rs index 595b9ce..002701a 100644 --- a/frame-metadata/src/v14.rs +++ b/frame-metadata/src/v14.rs @@ -103,8 +103,10 @@ impl IntoPortable for ExtrinsicMetadata { pub struct SignedExtensionMetadata { /// The unique signed extension identifier, which may be different from the type name. pub identifier: T::String, - /// The signed extensions in the order they appear in the extrinsic. + /// The type of the signed extension, with the data to be included in the extrinsic. pub ty: T::Type, + /// The type of the additional signed data, with the data to be included in the signed payload + pub additional_signed: T::Type, } impl IntoPortable for SignedExtensionMetadata { @@ -114,6 +116,7 @@ impl IntoPortable for SignedExtensionMetadata { SignedExtensionMetadata { identifier: self.identifier.into_portable(registry), ty: registry.register_type(&self.ty), + additional_signed: registry.register_type(&self.additional_signed), } } } @@ -261,11 +264,7 @@ impl IntoPortable for StorageEntryType { fn into_portable(self, registry: &mut Registry) -> Self::Output { match self { Self::Plain(plain) => StorageEntryType::Plain(registry.register_type(&plain)), - Self::Map { - hasher, - key, - value, - } => StorageEntryType::Map { + Self::Map { hasher, key, value } => StorageEntryType::Map { hasher, key: registry.register_type(&key), value: registry.register_type(&value),