Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix identity pallet benchmarks
  • Loading branch information
KiChjang committed Jun 22, 2021
commit 86504cc0031ec554c8dc87676ad6cc1d8373d89b
4 changes: 2 additions & 2 deletions frame/identity/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ fn add_sub_accounts<T: Config>(who: &T::AccountId, s: u32) -> Result<Vec<(T::Acc

// This creates an `IdentityInfo` object with `num_fields` extra fields.
// All data is pre-populated with some arbitrary bytes.
fn create_identity_info<T: Config>(num_fields: u32) -> IdentityInfo {
fn create_identity_info<T: Config>(num_fields: u32) -> IdentityInfo<T::MaxAdditionalFields> {
let data = Data::Raw(vec![0; 32]);

let info = IdentityInfo {
additional: vec![(data.clone(), data.clone()); num_fields as usize],
additional: vec![(data.clone(), data.clone()); num_fields as usize].try_into().unwrap(),
display: data.clone(),
legal: data.clone(),
web: data.clone(),
Expand Down