difftreelog
fix mint_with_props_weight
in: master
2 files changed
pallets/nonfungible/src/common.rsdiffbeforeafterboth110 }110 }111}111}112112113/// Weight of minting tokens with properties114/// * `create_no_data_weight` -- the weight of minting without properties115/// * `token_properties_nums` -- number of properties of each token116#[inline]113pub(crate) fn mint_with_props_weight<T: Config>(117pub(crate) fn mint_with_props_weight<T: Config>(114 create_no_data_weight: Weight,118 create_no_data_weight: Weight,115 tokens: impl Iterator<Item = u32> + Clone,119 token_properties_nums: impl Iterator<Item = u32> + Clone,116) -> Weight {120) -> Weight {117 create_no_data_weight.saturating_add(write_token_properties_total_weight::<T, _>(121 create_no_data_weight.saturating_add(write_token_properties_total_weight::<T, _>(118 tokens,122 token_properties_nums,119 <SelfWeightOf<T>>::write_token_properties,123 <SelfWeightOf<T>>::write_token_properties,120 ))124 ))121}125}pallets/refungible/src/common.rsdiffbeforeafterboth130 }130 }131}131}132132133/// Weight of minting tokens with properties134/// * `create_no_data_weight` -- the weight of minting without properties135/// * `token_properties_nums` -- number of properties of each token136#[inline]133pub(crate) fn mint_with_props_weight<T: Config>(137pub(crate) fn mint_with_props_weight<T: Config>(134 create_no_data_weight: Weight,138 create_no_data_weight: Weight,135 tokens: impl Iterator<Item = u32> + Clone,139 token_properties_nums: impl Iterator<Item = u32> + Clone,136) -> Weight {140) -> Weight {137 create_no_data_weight.saturating_add(write_token_properties_total_weight::<T, _>(141 create_no_data_weight.saturating_add(write_token_properties_total_weight::<T, _>(138 tokens,142 token_properties_nums,139 <SelfWeightOf<T>>::write_token_properties,143 <SelfWeightOf<T>>::write_token_properties,140 ))144 ))141}145}