mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 12:11:02 +00:00
Moves Block to frame_system instead of construct_runtime and removes Header and BlockNumber (#7431)
* Companion for substrate * Minor update * Formatting * Fixes for cumulus * Fixes tests in polkadot-runtime-parachains * Minor update * Removes unused import * Fixes tests in polkadot-runtime-common * Minor fix * Update roadmap/implementers-guide/src/runtime/configuration.md Co-authored-by: ordian <write@reusable.software> * ".git/.scripts/commands/fmt/fmt.sh" * update lockfile for {"substrate"} --------- Co-authored-by: ordian <write@reusable.software> Co-authored-by: command-bot <>
This commit is contained in:
@@ -28,6 +28,7 @@ use frame_support::{
|
||||
assert_err, assert_noop, assert_ok,
|
||||
traits::{OnFinalize, OnInitialize},
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use primitives::BlockNumber;
|
||||
use sp_core::{crypto::CryptoType, Pair};
|
||||
|
||||
@@ -2054,9 +2055,10 @@ fn deduplication_and_sorting_works() {
|
||||
|
||||
let disputes_orig = disputes.clone();
|
||||
|
||||
<Pallet<Test> as DisputesHandler<
|
||||
<Test as frame_system::Config>::BlockNumber,
|
||||
>>::deduplicate_and_sort_dispute_data(&mut disputes).unwrap_err();
|
||||
<Pallet<Test> as DisputesHandler<BlockNumberFor<Test>>>::deduplicate_and_sort_dispute_data(
|
||||
&mut disputes,
|
||||
)
|
||||
.unwrap_err();
|
||||
|
||||
// assert ordering of local only disputes, and at the same time, and being free of duplicates
|
||||
assert_eq!(disputes_orig.len(), disputes.len() + 1);
|
||||
@@ -2083,10 +2085,11 @@ fn apply_filter_all<T: Config, I: IntoIterator<Item = DisputeStatementSet>>(
|
||||
|
||||
let mut acc = Vec::<CheckedDisputeStatementSet>::new();
|
||||
for dispute_statement in sets {
|
||||
if let Some(checked) = <Pallet<T> as DisputesHandler<<T>::BlockNumber>>::filter_dispute_data(
|
||||
dispute_statement,
|
||||
post_conclusion_acceptance_period,
|
||||
) {
|
||||
if let Some(checked) =
|
||||
<Pallet<T> as DisputesHandler<BlockNumberFor<T>>>::filter_dispute_data(
|
||||
dispute_statement,
|
||||
post_conclusion_acceptance_period,
|
||||
) {
|
||||
acc.push(checked);
|
||||
}
|
||||
}
|
||||
@@ -2158,9 +2161,11 @@ fn filter_removes_duplicates_within_set() {
|
||||
};
|
||||
|
||||
let post_conclusion_acceptance_period = 10;
|
||||
let statements = <Pallet<Test> as DisputesHandler<
|
||||
<Test as frame_system::Config>::BlockNumber,
|
||||
>>::filter_dispute_data(statements, post_conclusion_acceptance_period);
|
||||
let statements =
|
||||
<Pallet<Test> as DisputesHandler<BlockNumberFor<Test>>>::filter_dispute_data(
|
||||
statements,
|
||||
post_conclusion_acceptance_period,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
statements,
|
||||
@@ -2446,7 +2451,7 @@ fn filter_removes_duplicate_statements_sets() {
|
||||
|
||||
// `Err(())` indicates presence of duplicates
|
||||
assert!(<Pallet::<Test> as DisputesHandler<
|
||||
<Test as frame_system::Config>::BlockNumber,
|
||||
BlockNumberFor<Test>,
|
||||
>>::deduplicate_and_sort_dispute_data(&mut sets)
|
||||
.is_err());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user