Various nits and alignments for testnet runtimes (#3024)

There were several improvements and PRs that didn't apply to all
runtimes, so this PR attempts to align those small differences. In
addition, the PR eliminates unused dependencies across multiple modules.

Relates to PR for `polkadot-fellows`:
https://github.com/polkadot-fellows/runtimes/pull/154
This commit is contained in:
Branislav Kontur
2024-01-23 23:51:47 +01:00
committed by GitHub
parent 01ac54db29
commit a817d310bb
51 changed files with 18 additions and 494 deletions
@@ -18,7 +18,6 @@ hex-literal = "0.4.1"
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.195", optional = true, features = ["derive"] }
smallvec = "1.11.0"
# Substrate
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true }
@@ -29,8 +29,9 @@ use pallet_broker::{CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600,
use parachains_common::{AccountId, Balance, BlockNumber};
use xcm::latest::prelude::*;
// TODO: check AccountId import
pub struct CreditToCollatorPot;
impl OnUnbalanced<Credit<polkadot_core_primitives::AccountId, Balances>> for CreditToCollatorPot {
impl OnUnbalanced<Credit<AccountId, Balances>> for CreditToCollatorPot {
fn on_nonzero_unbalanced(credit: Credit<polkadot_core_primitives::AccountId, Balances>) {
let staking_pot = CollatorSelection::account_id();
let _ = <Balances as Balanced<_>>::resolve(&staking_pot, credit);
@@ -18,7 +18,6 @@ hex-literal = "0.4.1"
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.195", optional = true, features = ["derive"] }
smallvec = "1.11.0"
# Substrate
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true }
@@ -451,13 +451,9 @@ construct_runtime!(
}
);
#[cfg(feature = "runtime-benchmarks")]
#[macro_use]
extern crate frame_benchmarking;
#[cfg(feature = "runtime-benchmarks")]
mod benches {
define_benchmarks!(
frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::<Runtime>]
[cumulus_pallet_parachain_system, ParachainSystem]
[pallet_timestamp, Timestamp]