Update to latest frame-metadata changes

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-09-16 18:06:00 +03:00
parent b13fcd66b8
commit 46bc4f2312
14 changed files with 658 additions and 15 deletions
+1
View File
@@ -41,6 +41,7 @@ pub struct Opts {
}
pub async fn run(opts: Opts, output: &mut impl Write) -> color_eyre::Result<()> {
println!("opts {:?}", opts);
validate_url_security(opts.file_or_url.url.as_ref(), opts.allow_insecure)?;
let bytes = opts.file_or_url.fetch().await?;
let mut metadata = RuntimeMetadataPrefixed::decode(&mut &bytes[..])?;
+3 -1
View File
@@ -122,7 +122,9 @@ impl FileOrUrl {
// Default if neither is provided; fetch from local url
(None, None, version) => {
let url = Url::parse("ws://localhost:9944").expect("Valid URL; qed");
Ok(fetch_metadata_from_url(url, version.unwrap_or_default()).await?)
let version = version.unwrap_or_default();
// println!("Fetching metadata from {url} with version {version:?}");
Ok(fetch_metadata_from_url(url, version).await?)
}
}
}