Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
MVP fix
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Oct 2, 2021
1 parent 965fc57 commit 44af848
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions runtime/parachains/src/inclusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,15 @@ impl<T: Config> Pallet<T> {
for (bit_idx, _) in
signed_bitfield.payload().0.iter().enumerate().filter(|(_, is_av)| **is_av)
{
let (_, pending_availability) = assigned_paras_record[bit_idx]
let pending_availability = if let Some((_, pending_availability)) = assigned_paras_record[bit_idx]
.as_mut()
.expect("validator bitfields checked not to contain bits corresponding to unoccupied cores; qed");
{
pending_availability
} else {
// only happens in case of unoccupied cores, which in turn happens in case
// of disputes.
continue;
};

// defensive check - this is constructed by loading the availability bitfield record,
// which is always `Some` if the core is occupied - that's why we're here.
Expand Down

0 comments on commit 44af848

Please sign in to comment.