Skip to content

Commit

Permalink
Improve working with metadata version
Browse files Browse the repository at this point in the history
  • Loading branch information
valentunn committed May 20, 2024
1 parent 05c076b commit 89b0510
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface WithName {
fun <T : WithName> List<T>.groupByName() = associateBy(WithName::name).toMap()

class RuntimeMetadata(
val runtimeVersion: BigInteger,
val metadataVersion: Int,
val modules: Map<String, Module>,
val extrinsic: ExtrinsicMetadata
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object PostV14RuntimeBuilder : RuntimeBuilder {
typeRegistry
),
modules = buildModules(metadataStruct[schema.pallets], typeRegistry),
runtimeVersion = reader.metadataVersion.toBigInteger()
metadataVersion = reader.metadataVersion
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal object V13RuntimeBuilder : RuntimeBuilder {
knownSignedExtensions = knownSignedExtensions
),
modules = buildModules(metadataStruct[RuntimeMetadataSchema.modules], typeRegistry),
runtimeVersion = reader.metadataVersion.toBigInteger()
metadataVersion = reader.metadataVersion
)
}

Expand Down

0 comments on commit 89b0510

Please sign in to comment.