difftreelog
fixup(imports): post-rebase
in: master
14 files changed
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,8 +26,8 @@
opt-level = 3
[profile.integration-tests]
+debug-assertions = true
inherits = "release"
-debug-assertions = true
[workspace.dependencies]
# Unique
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -32,20 +32,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use std::time::Duration;
-
-use codec::Encode;
-use cumulus_client_cli::generate_genesis_block;
use cumulus_primitives_core::ParaId;
-use log::{debug, info};
+use log::info;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
- NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,
+ NetworkParams, Result, SharedParams, SubstrateCli,
};
use sc_service::config::{BasePath, PrometheusConfig};
-use sp_core::hexdisplay::HexDisplay;
-use sp_runtime::traits::{AccountIdConversion, Block as BlockT};
-use up_common::types::opaque::{Block, RuntimeId};
+use sp_runtime::traits::AccountIdConversion;
+use up_common::types::opaque::RuntimeId;
#[cfg(feature = "runtime-benchmarks")]
use crate::chain_spec::default_runtime;
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -824,8 +824,8 @@
{
use fc_consensus::FrontierBlockImport;
use sc_consensus_manual_seal::{
- run_manual_seal, run_delayed_finalize, EngineCommand, ManualSealParams,
- DelayedFinalizeParams,
+ run_delayed_finalize, run_manual_seal, DelayedFinalizeParams, EngineCommand,
+ ManualSealParams,
};
let sc_service::PartialComponents {
pallets/collator-selection/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/collator-selection/src/benchmarking.rs
+++ b/pallets/collator-selection/src/benchmarking.rs
@@ -35,15 +35,15 @@
use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller};
use frame_support::{
assert_ok,
- parity_scale_codec::Decode,
traits::{
fungible::{Inspect, Mutate},
EnsureOrigin, Get,
},
};
-use frame_system::{EventRecord, RawOrigin};
+use frame_system::{pallet_prelude::*, EventRecord, RawOrigin};
use pallet_authorship::EventHandler;
use pallet_session::{self as session, SessionManager};
+use parity_scale_codec::Decode;
use sp_std::prelude::*;
use super::*;
@@ -338,7 +338,7 @@
register_candidates::<T>(c);
let new_block: BlockNumberFor<T>= 1800u32.into();
- let zero_block: T::BlockNumber = 0u32.into();
+ let zero_block: BlockNumberFor<T> = 0u32.into();
let candidates = <Candidates<T>>::get();
let non_removals = c.saturating_sub(r);
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -54,9 +54,9 @@
extern crate alloc;
use core::{
+ marker::PhantomData,
ops::{Deref, DerefMut},
slice::from_ref,
- marker::PhantomData,
};
use evm_coder::ToLog;
pallets/configuration/src/benchmarking.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! Benchmarking setup for pallet-configuration1819use frame_benchmarking::benchmarks;20use frame_support::assert_ok;21use frame_system::{EventRecord, RawOrigin};2223use super::*;2425fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) {26 let events = frame_system::Pallet::<T>::events();27 let system_event: <T as frame_system::Config>::RuntimeEvent = generic_event.into();28 // compare to the last event record29 let EventRecord { event, .. } = &events[events.len() - 1];30 assert_eq!(event, &system_event);31}3233benchmarks! {34 where_clause { where35 T: Config,36 T::Balance: From<u32>37 }3839 set_weight_to_fee_coefficient_override {40 let coeff: u64 = 999;41 }: {42 assert_ok!(43 <Pallet<T>>::set_weight_to_fee_coefficient_override(RawOrigin::Root.into(), Some(coeff))44 );45 }4647 set_min_gas_price_override {48 let coeff: u64 = 999;49 }: {50 assert_ok!(51 <Pallet<T>>::set_min_gas_price_override(RawOrigin::Root.into(), Some(coeff))52 );53 }5455 set_app_promotion_configuration_override {56 let configuration: AppPromotionConfiguration<BlockNumberFor<T>> = Default::default();57 }: {58 assert_ok!(59 <Pallet<T>>::set_app_promotion_configuration_override(RawOrigin::Root.into(), configuration)60 );61 }6263 set_collator_selection_desired_collators {64 let max: u32 = 999;65 }: {66 assert_ok!(67 <Pallet<T>>::set_collator_selection_desired_collators(RawOrigin::Root.into(), Some(max))68 );69 }70 verify {71 assert_last_event::<T>(Event::NewDesiredCollators{desired_collators: Some(max)}.into());72 }7374 set_collator_selection_license_bond {75 let bond_cost: Option<T::Balance> = Some(1000u32.into());76 }: {77 assert_ok!(78 <Pallet<T>>::set_collator_selection_license_bond(RawOrigin::Root.into(), bond_cost)79 );80 }81 verify {82 assert_last_event::<T>(Event::NewCollatorLicenseBond{bond_cost}.into());83 }8485 set_collator_selection_kick_threshold {86 let threshold: Option<BlockNumberFor<T>> = Some(900u32.into());87 }: {88 assert_ok!(89 <Pallet<T>>::set_collator_selection_kick_threshold(RawOrigin::Root.into(), threshold)90 );91 }92 verify {93 assert_last_event::<T>(Event::NewCollatorKickThreshold{length_in_blocks: threshold}.into());94 }95}pallets/inflation/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/inflation/src/benchmarking.rs
+++ b/pallets/inflation/src/benchmarking.rs
@@ -17,7 +17,7 @@
#![cfg(feature = "runtime-benchmarks")]
use frame_benchmarking::benchmarks;
-use frame_support::traits::OnInitialize;
+use frame_support::{pallet_prelude::*, traits::Hooks};
use super::*;
use crate::Pallet as Inflation;
@@ -25,9 +25,9 @@
benchmarks! {
on_initialize {
- let block1: T::BlockNumber = T::BlockNumber::from(1u32);
- let block2: T::BlockNumber = T::BlockNumber::from(2u32);
- Inflation::<T>::on_initialize(block1); // Create Treasury account
- }: { Inflation::<T>::on_initialize(block2); } // Benchmark deposit_into_existing path
+ let block1: BlockNumberFor<T> = 1u32.into();
+ let block2: BlockNumberFor<T> = 2u32.into();
+ <Inflation<T> as Hooks>::on_initialize(block1); // Create Treasury account
+ }: { <Inflation<T> as Hooks>::on_initialize(block2); } // Benchmark deposit_into_existing path
}
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -18,7 +18,7 @@
use pallet_common::{
bench_init,
benchmarking::{
- create_collection_raw, property_key, property_value, load_is_admin_and_property_permissions,
+ create_collection_raw, load_is_admin_and_property_permissions, property_key, property_value,
},
CommonCollectionOperations,
};
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -103,9 +103,9 @@
};
pub use pallet::*;
use pallet_common::{
- Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, CollectionHandle,
- eth::collection_id_to_address, SelfWeightOf as PalletCommonWeightOf,
- weights::WeightInfo as CommonWeightInfo, helpers::add_weight_to_post_info,
+ eth::collection_id_to_address, helpers::add_weight_to_post_info,
+ weights::WeightInfo as CommonWeightInfo, CollectionHandle, Error as CommonError,
+ Event as CommonEvent, Pallet as PalletCommon, SelfWeightOf as PalletCommonWeightOf,
};
use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
@@ -116,9 +116,9 @@
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult, TransactionOutcome};
use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec};
use up_data_structs::{
- AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
- mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey, PropertyValue,
- PropertyKeyPermission, PropertyScope, TokenChild, AuxPropertyValue, PropertiesPermissionMap,
+ budget::Budget, mapping::TokenAddressMapping, AccessMode, AuxPropertyValue, CollectionId,
+ CreateCollectionData, CreateNftExData, CustomDataLimit, PropertiesPermissionMap, Property,
+ PropertyKey, PropertyKeyPermission, PropertyScope, PropertyValue, TokenChild, TokenId,
TokenProperties as TokenPropertiesT,
};
use weights::WeightInfo;
pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -20,7 +20,7 @@
use pallet_common::{
bench_init,
benchmarking::{
- create_collection_raw, property_key, property_value, load_is_admin_and_property_permissions,
+ create_collection_raw, load_is_admin_and_property_permissions, property_key, property_value,
},
};
use sp_std::prelude::*;
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -106,7 +106,7 @@
budget::Budget, mapping::TokenAddressMapping, AccessMode, CollectionId, CreateCollectionData,
CreateRefungibleExMultipleOwners, PropertiesPermissionMap, Property, PropertyKey,
PropertyKeyPermission, PropertyScope, PropertyValue, TokenId, TokenOwnerError,
- TokenProperties as TokenPropertiesT, TrySetProperty, MAX_REFUNGIBLE_PIECES,
+ TokenProperties as TokenPropertiesT, MAX_REFUNGIBLE_PIECES,
};
use crate::{erc::ERC721Events, erc_token::ERC20Events};
runtime/opal/src/xcm_barrier.rsdiffbeforeafterboth--- a/runtime/opal/src/xcm_barrier.rs
+++ b/runtime/opal/src/xcm_barrier.rs
@@ -15,8 +15,10 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
use frame_support::{match_types, traits::Everything};
-use xcm::latest::{Junctions::*, MultiLocation};
-use staging_xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit, AllowExplicitUnpaidExecutionFrom};
+use staging_xcm::latest::{Junctions::*, MultiLocation};
+use staging_xcm_builder::{
+ AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
+};
match_types! {
pub type ParentOnly: impl Contains<MultiLocation> = {
runtime/quartz/src/xcm_barrier.rsdiffbeforeafterboth--- a/runtime/quartz/src/xcm_barrier.rs
+++ b/runtime/quartz/src/xcm_barrier.rs
@@ -17,8 +17,8 @@
use frame_support::{match_types, traits::Everything};
use staging_xcm::latest::{Junctions::*, MultiLocation};
use staging_xcm_builder::{
- AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,
- AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom,
+ AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom,
+ AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
};
use crate::PolkadotXcm;
runtime/unique/src/xcm_barrier.rsdiffbeforeafterboth--- a/runtime/unique/src/xcm_barrier.rs
+++ b/runtime/unique/src/xcm_barrier.rs
@@ -17,8 +17,8 @@
use frame_support::{match_types, traits::Everything};
use staging_xcm::latest::{Junctions::*, MultiLocation};
use staging_xcm_builder::{
- AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,
- AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom,
+ AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom,
+ AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
};
use crate::PolkadotXcm;