21
21
#[ cfg( feature = "runtime-benchmarks" ) ]
22
22
#[ macro_use]
23
23
extern crate frame_benchmarking;
24
+
24
25
use cumulus_pallet_parachain_system:: RelayNumberStrictlyIncreases ;
25
26
use frame_support:: {
26
27
construct_runtime, parameter_types,
27
- traits:: { fungible:: { Credit , Inspect } , tokens, ConstU32 , Contains , EitherOfDiverse , InstanceFilter , PrivilegeCmp } ,
28
+ traits:: {
29
+ fungible:: { Credit , Inspect } ,
30
+ tokens, ConstU32 , Contains , EitherOfDiverse , InstanceFilter , PrivilegeCmp ,
31
+ } ,
28
32
weights:: { ConstantMultiplier , Weight } ,
29
33
} ;
30
34
use frame_system:: { EnsureRoot , EnsureSigned } ;
@@ -34,10 +38,7 @@ use parachains_common::AssetIdForTrustBackedAssets as AssetId;
34
38
use parity_scale_codec:: Encode ;
35
39
use polkadot_runtime_common:: { BlockHashCount , CurrencyToVote , SlowAdjustingFeeUpdate } ;
36
40
use sp_api:: impl_runtime_apis;
37
- pub use sp_consensus_aura:: sr25519:: AuthorityId as AuraId ;
38
41
use sp_core:: { crypto:: KeyTypeId , OpaqueMetadata } ;
39
- #[ cfg( any( feature = "std" , test) ) ]
40
- pub use sp_runtime:: BuildStorage ;
41
42
use sp_runtime:: {
42
43
create_runtime_str, generic, impl_opaque_keys,
43
44
traits:: {
@@ -46,27 +47,31 @@ use sp_runtime::{
46
47
transaction_validity:: { TransactionSource , TransactionValidity } ,
47
48
ApplyExtrinsicResult , FixedU128 , MultiSignature , SaturatedConversion ,
48
49
} ;
49
- pub use sp_runtime:: { MultiAddress , Perbill , Permill } ;
50
50
use sp_std:: { cmp:: Ordering , prelude:: * } ;
51
-
52
- #[ cfg( feature = "std" ) ]
53
- use sp_version:: NativeVersion ;
54
51
use sp_version:: RuntimeVersion ;
55
52
56
53
// XCM Imports
57
54
use xcm_config:: { XcmConfig , XcmOriginToTransactDispatchOrigin } ;
58
55
use xcm_executor:: XcmExecutor ;
59
56
60
57
// Polimec Shared Imports
61
- pub use shared_configuration:: { currency:: * , fee:: * , funding:: * , governance:: * , proxy:: * , staking:: * , weights:: * } ;
62
-
63
58
pub use pallet_parachain_staking;
59
+ pub use shared_configuration:: { currency:: * , fee:: * , funding:: * , governance:: * , proxy:: * , staking:: * , weights:: * } ;
60
+ pub use sp_consensus_aura:: sr25519:: AuthorityId as AuraId ;
61
+ pub use sp_runtime:: { MultiAddress , Perbill , Permill } ;
64
62
65
63
// Make the WASM binary available.
66
64
#[ cfg( feature = "std" ) ]
67
65
include ! ( concat!( env!( "OUT_DIR" ) , "/wasm_binary.rs" ) ) ;
68
66
67
+ #[ cfg( feature = "std" ) ]
68
+ use sp_version:: NativeVersion ;
69
+
70
+ #[ cfg( any( feature = "std" , test) ) ]
71
+ pub use sp_runtime:: BuildStorage ;
72
+
69
73
mod custom_migrations;
74
+ mod weights;
70
75
pub mod xcm_config;
71
76
72
77
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
@@ -190,7 +195,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
190
195
spec_name : create_runtime_str ! ( "polimec-mainnet" ) ,
191
196
impl_name : create_runtime_str ! ( "polimec-mainnet" ) ,
192
197
authoring_version : 1 ,
193
- spec_version : 0_005_000 ,
198
+ spec_version : 0_005_001 ,
194
199
impl_version : 0 ,
195
200
apis : RUNTIME_API_VERSIONS ,
196
201
transaction_version : 1 ,
@@ -482,7 +487,7 @@ impl pallet_elections_phragmen::Config for Runtime {
482
487
/// triggered and the module will be in passive mode.
483
488
type TermDuration = TermDuration ;
484
489
type VotingLockPeriod = VotingLockPeriod ;
485
- type WeightInfo = pallet_elections_phragmen :: weights :: SubstrateWeight < Runtime > ;
490
+ type WeightInfo = weights :: pallet_elections_phragmen :: WeightInfo < Runtime > ;
486
491
}
487
492
488
493
pub struct Electorate ;
@@ -550,7 +555,7 @@ pub struct EqualOrGreatestRootCmp;
550
555
impl PrivilegeCmp < OriginCaller > for EqualOrGreatestRootCmp {
551
556
fn cmp_privilege ( left : & OriginCaller , right : & OriginCaller ) -> Option < Ordering > {
552
557
if left == right {
553
- return Some ( Ordering :: Equal )
558
+ return Some ( Ordering :: Equal ) ;
554
559
}
555
560
match ( left, right) {
556
561
// Root is greater than anything.
@@ -832,11 +837,11 @@ mod benches {
832
837
// Monetary stuff.
833
838
[ pallet_balances, Balances ]
834
839
[ pallet_vesting, Vesting ]
835
-
840
+
836
841
// Collator support.
837
842
[ pallet_session, SessionBench :: <Runtime >]
838
843
[ pallet_parachain_staking, ParachainStaking ]
839
-
844
+
840
845
// XCM helpers.
841
846
[ cumulus_pallet_xcmp_queue, XcmpQueue ]
842
847
[ pallet_xcm, PolkadotXcm ]
0 commit comments