difftreelog
fix build with unique/quartz runtimes
in: master
3 files changed
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -374,7 +374,7 @@
}
#[cfg(feature = "unique-runtime")]
Some(Subcommand::Benchmark(cmd)) => {
- use frame_benchmarking_cli::BenchmarkCmd;
+ use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
let runner = cli.create_runner(cmd)?;
// Switch on the concrete benchmark sub-command-
match cmd {
@@ -406,7 +406,9 @@
cmd.run(config, partials.client.clone(), db, storage)
}),
- BenchmarkCmd::Machine(cmd) => runner.sync_run(|config| cmd.run(&config)),
+ BenchmarkCmd::Machine(cmd) => {
+ runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()))
+ }
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
}
}
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.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -35,7 +35,7 @@
Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,
generic::Era,
traits::{
- Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating,
+ Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf, Saturating,
CheckedConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion,
Zero, Member,
},
@@ -75,14 +75,7 @@
DispatchClass, DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,
},
-};
-use unique_runtime_common::{
- dispatch::{CollectionDispatchT, CollectionDispatch},
- weights::CommonWeights,
- sponsoring::UniqueSponsorshipHandler,
- eth_sponsoring::UniqueEthSponsorshipHandler,
};
-use up_data_structs::*;
// use pallet_contracts::weights::WeightInfo;
// #[cfg(any(feature = "std", test))]
use frame_system::{
@@ -124,7 +117,6 @@
Error as XcmError,
};
use xcm_executor::traits::{MatchesFungible, WeightTrader};
-use sp_runtime::traits::CheckedConversion;
use unique_runtime_common::{
impl_common_runtime_apis,
@@ -248,8 +240,8 @@
pub struct FixedFee;
impl FeeCalculator for FixedFee {
- fn min_gas_price() -> U256 {
- MIN_GAS_PRICE.into()
+ fn min_gas_price() -> (U256, u64) {
+ (MIN_GAS_PRICE.into(), 0)
}
}
@@ -1250,9 +1242,14 @@
}
}
- fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option<TransactionValidity> {
+ fn validate_self_contained(
+ &self,
+ info: &Self::SignedInfo,
+ dispatch_info: &DispatchInfoOf<Call>,
+ len: usize,
+ ) -> Option<TransactionValidity> {
match self {
- Call::Ethereum(call) => call.validate_self_contained(info),
+ Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len),
_ => None,
}
}