chore: fix some typos (#2098)

This commit is contained in:
Evelina Carl
2025-09-26 19:43:45 +10:00
committed by GitHub
parent b13b8ec8d0
commit 884dfe6c69
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -292,7 +292,7 @@ async fn get_metadata<T: Config>(
})?;
// Option because we may have asked for a version that doesn't exist. Compact because we get back a Vec<u8>
// of the metadata bytes, and the Vec is preceeded by it's compact encoded length. The actual bytes are then
// of the metadata bytes, and the Vec is preceded by it's compact encoded length. The actual bytes are then
// decoded as a `RuntimeMetadataPrefixed`, after this.
let (_, metadata) = <Option<(Compact<u32>, RuntimeMetadataPrefixed)>>::decode(&mut &rpc_response[..])
.map_err(|e| OnlineClientAtBlockError::CannotGetMetadata {
+1 -1
View File
@@ -30,7 +30,7 @@ pub enum Error {
StorageValueError(#[from] StorageValueError),
}
/// Errors consctructing an online client.
/// Errors constructing an online client.
#[allow(missing_docs)]
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
+2 -2
View File
@@ -921,14 +921,14 @@ mod tests {
// Build metadata with both pallets.
let metadata_both = pallets_to_metadata(pallets);
// Hashing will ignore any non-existant pallet and return the same result.
// Hashing will ignore any non-existent pallet and return the same result.
let hash = MetadataHasher::new(&metadata_one)
.only_these_pallets(&["First", "Second"])
.hash();
let hash_rhs = MetadataHasher::new(&metadata_one)
.only_these_pallets(&["First"])
.hash();
assert_eq!(hash, hash_rhs, "hashing should ignore non-existant pallets");
assert_eq!(hash, hash_rhs, "hashing should ignore non-existent pallets");
// Hashing one pallet from metadata with 2 pallets inserted will ignore the second pallet.
let hash_second = MetadataHasher::new(&metadata_both)