Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent bug when reusing type ids in hashing #1075

Merged
4 changes: 2 additions & 2 deletions metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod from_into;
mod utils;

use scale_info::{form::PortableForm, PortableRegistry, Variant};
use std::collections::{HashMap, HashSet};
use std::collections::HashMap;
use std::sync::Arc;
use utils::ordered_map::OrderedMap;
use utils::variant_index::VariantIndex;
Expand Down Expand Up @@ -152,7 +152,7 @@ impl Metadata {
Some(crate::utils::validation::get_type_hash(
&self.types,
id,
&mut HashSet::<u32>::new(),
&mut HashMap::<u32, u32>::new(),
))
}
}
Expand Down
Loading