Moves Block to frame_system instead of construct_runtime and removes Header and BlockNumber (#2790)

* Fixes

* Removes unused import

* Uses Block and removes BlockNumber/Header from Chain

* Fixes bridges

* Fixes

* Removes unused import

* Fixes build

* Uses correct RelayBlock

* Minor fix

* Fixes glutton-kusama

* Uses correct RelayBlock

* Minor fix

* Fixes benchmark for pallet-bridge-parachains

* Adds appropriate constraints

* Minor fixes

* Removes unused import

* Fixes integrity tests

* Minor fixes

* Updates trait bounds

* Uses custom bound for AsPrimitive

* Fixes trait bounds

* Revert "Fixes trait bounds"

This reverts commit 0b0f42f583f3a616a88afe45fcd06d31e7d9a06f.

* Revert "Uses custom bound for AsPrimitive"

This reverts commit 838e5281adf8b6e9632a2abb9cd550db4ae24126.

* No AsPrimitive trait bound for now

* Removes bounds on Number

* update lockfile for {"substrate", "polkadot"}

* Formatting

* ".git/.scripts/commands/fmt/fmt.sh"

* Minor fix

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
gupnik
2023-07-13 19:00:28 +05:30
committed by GitHub
parent 49145bdd9b
commit 24d6e46ad0
54 changed files with 449 additions and 633 deletions
@@ -38,6 +38,7 @@ use frame_support::{
assert_ok,
traits::{Get, OriginTrait, PalletInfoAccess},
};
use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor};
use pallet_bridge_grandpa::BridgedHeader;
use parachains_runtimes_test_utils::{
mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, RuntimeHelper,
@@ -590,7 +591,7 @@ pub fn complex_relay_extrinsic_works<Runtime, XcmConfig, HrmpChannelOpener, GPI,
local_relay_chain_id: NetworkId,
lane_id: LaneId,
existential_deposit: BalanceOf<Runtime>,
executive_init_block: fn(&<Runtime as frame_system::Config>::Header),
executive_init_block: fn(&HeaderFor<Runtime>),
construct_and_apply_extrinsic: fn(
sp_keyring::AccountKeyring,
pallet_utility::Call::<Runtime>
@@ -653,10 +654,9 @@ pub fn complex_relay_extrinsic_works<Runtime, XcmConfig, HrmpChannelOpener, GPI,
.with_tracing()
.build()
.execute_with(|| {
let zero: <Runtime as frame_system::Config>::BlockNumber = 0u32.into();
let zero: BlockNumberFor<Runtime> = 0u32.into();
let genesis_hash = frame_system::Pallet::<Runtime>::block_hash(zero);
let mut header: <Runtime as frame_system::Config>::Header =
bp_test_utils::test_header(1u32.into());
let mut header: HeaderFor<Runtime> = bp_test_utils::test_header(1u32.into());
header.set_parent_hash(genesis_hash);
executive_init_block(&header);