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
Next Next commit
Bring back test, but this time corrected
  • Loading branch information
bkchr committed Oct 4, 2021
commit 02f67e5b5af106b6e7669dd8339c28218f66f65d
21 changes: 21 additions & 0 deletions runtime/parachains/src/inclusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,27 @@ mod tests {
.is_err());
}

// non-pending bit set.
{
let mut bare_bitfield = default_bitfield();
*bare_bitfield.0.get_mut(0).unwrap() = true;
let signed = block_on(sign_bitfield(
&keystore,
&validators[0],
ValidatorIndex(0),
bare_bitfield,
&signing_context,
));
assert_eq!(
ParaInclusion::process_bitfields(
expected_bits(),
vec![signed.into()],
&core_lookup,
),
Ok(vec![])
);
}

// empty bitfield signed: always OK, but kind of useless.
{
let bare_bitfield = default_bitfield();
Expand Down