From a22beacc59e5b271a57e89d10fe12c9c3f424ce4 Mon Sep 17 00:00:00 2001 From: ordian Date: Tue, 4 Jun 2024 16:18:50 +0200 Subject: [PATCH] no test - no problem --- .../runtime/parachains/src/disputes/tests.rs | 65 ------------------- .../parachains/src/paras_inherent/mod.rs | 10 +-- 2 files changed, 5 insertions(+), 70 deletions(-) diff --git a/polkadot/runtime/parachains/src/disputes/tests.rs b/polkadot/runtime/parachains/src/disputes/tests.rs index 5e4e7036bfef..4fbddf821a5d 100644 --- a/polkadot/runtime/parachains/src/disputes/tests.rs +++ b/polkadot/runtime/parachains/src/disputes/tests.rs @@ -577,71 +577,6 @@ fn test_disputes_with_missing_backing_votes_are_rejected() { }) } -#[test] -fn test_freeze_on_note_included() { - new_test_ext(Default::default()).execute_with(|| { - let v0 = ::Pair::generate().0; - let v1 = ::Pair::generate().0; - - run_to_block(6, |b| { - // a new session at each block - Some(( - true, - b, - vec![(&0, v0.public()), (&1, v1.public())], - Some(vec![(&0, v0.public()), (&1, v1.public())]), - )) - }); - - let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); - let inclusion_parent = sp_core::H256::repeat_byte(0xff); - let session = 3; - - // v0 votes for 3 - let stmts = vec![DisputeStatementSet { - candidate_hash, - session: 3, - statements: vec![ - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(0), - v0.sign( - &ExplicitDisputeStatement { valid: false, candidate_hash, session: 3 } - .signing_payload(), - ), - ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(1), - v1.sign( - &ExplicitDisputeStatement { valid: false, candidate_hash, session: 3 } - .signing_payload(), - ), - ), - ( - DisputeStatement::Valid(ValidDisputeStatementKind::BackingValid( - inclusion_parent, - )), - ValidatorIndex(1), - v0.sign(&CompactStatement::Valid(candidate_hash).signing_payload( - &SigningContext { session_index: session, parent_hash: inclusion_parent }, - )), - ), - ], - }]; - assert!(Pallet::::process_checked_multi_dispute_data( - &stmts - .into_iter() - .map(CheckedDisputeStatementSet::unchecked_from_unchecked) - .collect() - ) - .is_ok()); - - Pallet::::note_included(3, candidate_hash, 3); - assert_eq!(Frozen::::get(), Some(2)); - }); -} - #[test] fn test_freeze_provided_against_supermajority_for_included() { new_test_ext(Default::default()).execute_with(|| { diff --git a/polkadot/runtime/parachains/src/paras_inherent/mod.rs b/polkadot/runtime/parachains/src/paras_inherent/mod.rs index 63fedadd6b2a..370d9bbe51e4 100644 --- a/polkadot/runtime/parachains/src/paras_inherent/mod.rs +++ b/polkadot/runtime/parachains/src/paras_inherent/mod.rs @@ -424,11 +424,11 @@ impl Pallet { METRICS.on_after_filter(all_weight_after.ref_time()); log::debug!( - target: LOG_TARGET, - "[process_inherent_data] after filter: bitfields.len(): {}, backed_candidates.len(): {}, checked_disputes_sets.len() {}", - bitfields.len(), - backed_candidates.len(), - checked_disputes_sets.len() + target: LOG_TARGET, + "[process_inherent_data] after filter: bitfields.len(): {}, backed_candidates.len(): {}, checked_disputes_sets.len() {}", + bitfields.len(), + backed_candidates.len(), + checked_disputes_sets.len() ); log::debug!(target: LOG_TARGET, "Size after filter: {}, candidates + bitfields: {}, disputes: {}", all_weight_after.proof_size(), non_disputes_weight.proof_size(), checked_disputes_sets_consumed_weight.proof_size()); log::debug!(target: LOG_TARGET, "Time weight after filter: {}, candidates + bitfields: {}, disputes: {}", all_weight_after.ref_time(), non_disputes_weight.ref_time(), checked_disputes_sets_consumed_weight.ref_time());