@@ -97,7 +97,6 @@ use polkadot_runtime_common::{
9797 paras_registrar, prod_or_fast, slots, BalanceToU256 , BlockHashCount , BlockLength ,
9898 CurrencyToVote , SlowAdjustingFeeUpdate , U256ToBalance ,
9999} ;
100- use relay_common:: apis:: * ;
101100use runtime_parachains:: {
102101 assigner_coretime as parachains_assigner_coretime,
103102 configuration:: {
@@ -124,7 +123,7 @@ use sp_runtime::{
124123 generic, impl_opaque_keys,
125124 traits:: {
126125 AccountIdConversion , AccountIdLookup , BlakeTwo256 , Block as BlockT , Convert , ConvertInto ,
127- Get , IdentityLookup , Keccak256 , OpaqueKeys , SaturatedConversion , Saturating , Verify ,
126+ Get , IdentityLookup , Keccak256 , OpaqueKeys , SaturatedConversion , Verify ,
128127 } ,
129128 transaction_validity:: { TransactionPriority , TransactionSource , TransactionValidity } ,
130129 ApplyExtrinsicResult , FixedU128 , KeyTypeId , OpaqueValue , Perbill , Percent , Permill ,
@@ -2437,43 +2436,7 @@ mod benches {
24372436#[ cfg( feature = "runtime-benchmarks" ) ]
24382437use benches:: * ;
24392438
2440- impl Runtime {
2441- fn impl_experimental_inflation_info ( ) -> InflationInfo {
2442- use pallet_staking:: { ActiveEra , EraPayout , ErasTotalStake } ;
2443- let ( staked, _start) = ActiveEra :: < Runtime > :: get ( )
2444- . map ( |ae| ( ErasTotalStake :: < Runtime > :: get ( ae. index ) , ae. start . unwrap_or ( 0 ) ) )
2445- . unwrap_or ( ( 0 , 0 ) ) ;
2446-
2447- let ideal_staking_rate = dynamic_params:: inflation:: IdealStake :: get ( ) ;
2448- let inflation = if dynamic_params:: inflation:: UseAuctionSlots :: get ( ) {
2449- let auctioned_slots = parachains_paras:: Parachains :: < Runtime > :: get ( )
2450- . into_iter ( )
2451- // All active para-ids that do not belong to a system chain is the number of
2452- // parachains that we should take into account for inflation.
2453- . filter ( |i| * i >= LOWEST_PUBLIC_ID )
2454- . count ( ) as u64 ;
2455- ideal_staking_rate
2456- . saturating_sub ( Perquintill :: from_rational ( auctioned_slots. min ( 60 ) , 200u64 ) )
2457- } else {
2458- ideal_staking_rate
2459- } ;
2460-
2461- // We assume un-delayed 6h eras.
2462- let era_duration = 6 * ( HOURS as Moment ) * MILLISECS_PER_BLOCK ;
2463- let next_mint =
2464- <Self as pallet_staking:: Config >:: EraPayout :: era_payout ( staked, 0 , era_duration) ;
2465-
2466- InflationInfo { inflation, next_mint }
2467- }
2468- }
2469-
24702439sp_api:: impl_runtime_apis! {
2471- impl relay_common:: apis:: Inflation <Block > for Runtime {
2472- fn experimental_inflation_prediction_info( ) -> InflationInfo {
2473- Runtime :: impl_experimental_inflation_info( )
2474- }
2475- }
2476-
24772440 impl sp_api:: Core <Block > for Runtime {
24782441 fn version( ) -> RuntimeVersion {
24792442 VERSION
0 commit comments