Skip to content

Commit

Permalink
Merge branch 'master' into jsdw-signer-nostd-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Jan 30, 2025
2 parents 9f4ea8f + 94f4e7f commit 013874f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 1 addition & 3 deletions metadata/src/from_into/v15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,7 @@ mod into_v15 {
event_enum_ty: m.outer_enums.event_enum_ty.into(),
error_enum_ty: m.outer_enums.error_enum_ty.into(),
},
custom: v15::CustomMetadata {
map: Default::default(),
},
custom: m.custom,
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions testing/integration-tests/src/full_client/metadata/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ fn pallets_to_metadata(pallets: Vec<PalletMetadata>) -> Metadata {
))
}

#[subxt_test]
async fn metadata_converting_works_ok() {
let ctx = test_context().await;
let api = ctx.client();

assert!(
node_runtime::is_codegen_valid_for(&api.metadata()),
"Should be valid initially"
);

let metadata = RuntimeMetadataV15::from((*api.metadata()).clone());
let metadata = v15_to_metadata(metadata);

assert!(
node_runtime::is_codegen_valid_for(&metadata),
"Should still be valid after conversion back and forth"
);
}

#[subxt_test]
async fn full_metadata_check() {
let ctx = test_context().await;
Expand Down

0 comments on commit 013874f

Please sign in to comment.