difftreelog
fix build with unique/quartz runtimes
in: master
3 files changed
node/cli/src/command.rsdiffbeforeafterboth374 }374 }375 #[cfg(feature = "unique-runtime")]375 #[cfg(feature = "unique-runtime")]376 Some(Subcommand::Benchmark(cmd)) => {376 Some(Subcommand::Benchmark(cmd)) => {377 use frame_benchmarking_cli::BenchmarkCmd;377 use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};378 let runner = cli.create_runner(cmd)?;378 let runner = cli.create_runner(cmd)?;379 // Switch on the concrete benchmark sub-command-379 // Switch on the concrete benchmark sub-command-380 match cmd {380 match cmd {406406407 cmd.run(config, partials.client.clone(), db, storage)407 cmd.run(config, partials.client.clone(), db, storage)408 }),408 }),409 BenchmarkCmd::Machine(cmd) => runner.sync_run(|config| cmd.run(&config)),409 BenchmarkCmd::Machine(cmd) => {410 runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()))411 }410 BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),412 BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),411 }413 }412 }414 }runtime/quartz/src/lib.rsdiffbeforeafterboth66 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,66 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,67 },67 },68};68};69use up_data_structs::*;70// use pallet_contracts::weights::WeightInfo;69// use pallet_contracts::weights::WeightInfo;71// #[cfg(any(feature = "std", test))]70// #[cfg(any(feature = "std", test))]72use frame_system::{71use frame_system::{82use fp_rpc::TransactionStatus;81use fp_rpc::TransactionStatus;83use sp_runtime::{82use sp_runtime::{84 traits::{83 traits::{85 Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating,84 Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf, Saturating,86 CheckedConversion,85 CheckedConversion,87 },86 },88 generic::Era,87 generic::Era,246245247pub struct FixedFee;246pub struct FixedFee;248impl FeeCalculator for FixedFee {247impl FeeCalculator for FixedFee {249 fn min_gas_price() -> U256 {248 fn min_gas_price() -> (U256, u64) {250 MIN_GAS_PRICE.into()249 (MIN_GAS_PRICE.into(), 0)251 }250 }252}251}253252862}861}863862864impl pallet_common::Config for Runtime {863impl pallet_common::Config for Runtime {864 type WeightInfo = pallet_common::weights::SubstrateWeight<Self>;865 type Event = Event;865 type Event = Event;866867 type Currency = Balances;866 type Currency = Balances;125112501252 fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option<TransactionValidity> {1251 fn validate_self_contained(1252 &self,1253 info: &Self::SignedInfo,1254 dispatch_info: &DispatchInfoOf<Call>,1255 len: usize,1256 ) -> Option<TransactionValidity> {1253 match self {1257 match self {1254 Call::Ethereum(call) => call.validate_self_contained(info),1258 Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len),1255 _ => None,1259 _ => None,1256 }1260 }1257 }1261 }runtime/unique/src/lib.rsdiffbeforeafterboth35 Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,35 Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,36 generic::Era,36 generic::Era,37 traits::{37 traits::{38 Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating,38 Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf, Saturating,39 CheckedConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion,39 CheckedConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion,40 Zero, Member,40 Zero, Member,41 },41 },76 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,76 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,77 },77 },78};78};79use unique_runtime_common::{80 dispatch::{CollectionDispatchT, CollectionDispatch},81 weights::CommonWeights,82 sponsoring::UniqueSponsorshipHandler,83 eth_sponsoring::UniqueEthSponsorshipHandler,84};85use up_data_structs::*;86// use pallet_contracts::weights::WeightInfo;79// use pallet_contracts::weights::WeightInfo;87// #[cfg(any(feature = "std", test))]80// #[cfg(any(feature = "std", test))]88use frame_system::{81use frame_system::{124 Error as XcmError,117 Error as XcmError,125};118};126use xcm_executor::traits::{MatchesFungible, WeightTrader};119use xcm_executor::traits::{MatchesFungible, WeightTrader};127use sp_runtime::traits::CheckedConversion;128120129use unique_runtime_common::{121use unique_runtime_common::{130 impl_common_runtime_apis,122 impl_common_runtime_apis,248240249pub struct FixedFee;241pub struct FixedFee;250impl FeeCalculator for FixedFee {242impl FeeCalculator for FixedFee {251 fn min_gas_price() -> U256 {243 fn min_gas_price() -> (U256, u64) {252 MIN_GAS_PRICE.into()244 (MIN_GAS_PRICE.into(), 0)253 }245 }254}246}255247125212441253 fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option<TransactionValidity> {1245 fn validate_self_contained(1246 &self,1247 info: &Self::SignedInfo,1248 dispatch_info: &DispatchInfoOf<Call>,1249 len: usize,1250 ) -> Option<TransactionValidity> {1254 match self {1251 match self {1255 Call::Ethereum(call) => call.validate_self_contained(info),1252 Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len),1256 _ => None,1253 _ => None,1257 }1254 }1258 }1255 }