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.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -66,7 +66,6 @@
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,
},
};
-use up_data_structs::*;
// use pallet_contracts::weights::WeightInfo;
// #[cfg(any(feature = "std", test))]
use frame_system::{
@@ -82,7 +81,7 @@
use fp_rpc::TransactionStatus;
use sp_runtime::{
traits::{
- Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating,
+ Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf, Saturating,
CheckedConversion,
},
generic::Era,
@@ -246,8 +245,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)
}
}
@@ -862,8 +861,8 @@
}
impl pallet_common::Config for Runtime {
+ type WeightInfo = pallet_common::weights::SubstrateWeight<Self>;
type Event = Event;
-
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
@@ -1249,9 +1248,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,
}
}
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 }