Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove incorrect code
  • Loading branch information
bkchr committed Oct 4, 2021
commit ed33128cf0d841a25b0d88b90756583799c49d32
19 changes: 0 additions & 19 deletions runtime/parachains/src/inclusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ pub mod pallet {
NotCollatorSigned,
/// The validation data hash does not match expected.
ValidationDataHashMismatch,
/// Internal error only returned when compiled with debug assertions.
InternalError,
/// The downward message queue is not processed correctly.
IncorrectDownwardMessageHandling,
/// At least one upward message sent does not pass the acceptance criteria.
Expand Down Expand Up @@ -263,14 +261,6 @@ impl<T: Config> Pallet<T> {
// 3. each bitfield has exactly `expected_bits`
// 4. signature is valid.
let signed_bitfields = {
let occupied_bitmask: BitVec<BitOrderLsb0, u8> = assigned_paras_record
.iter()
.map(|p| {
p.as_ref()
.map_or(false, |(_id, pending_availability)| pending_availability.is_some())
})
.collect();

let mut last_index = None;

let signing_context = SigningContext {
Expand All @@ -297,13 +287,6 @@ impl<T: Config> Pallet<T> {
Error::<T>::ValidatorIndexOutOfBounds,
);

// If there is a bit set that shouldn't bet set, we ignore it.
if occupied_bitmask.clone() & unchecked_bitfield.unchecked_payload().0.clone() !=
unchecked_bitfield.unchecked_payload().0
{
continue
}

let validator_public =
&validators[unchecked_bitfield.unchecked_validator_index().0 as usize];

Expand Down Expand Up @@ -343,8 +326,6 @@ impl<T: Config> Pallet<T> {
candidate_pending_availability.availability_votes.get_mut(val_idx)
}) {
*bit = true;
} else if cfg!(debug_assertions) {
return Err(Error::<T>::InternalError.into())
}
}

Expand Down