mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Remove unoccupied bit check (#3999)
* remove the check for unoccupied bitfields * bump rococo version * fix warning about occupied bitmask
This commit is contained in:
committed by
GitHub
parent
ec180fec9e
commit
6d83b59944
@@ -170,8 +170,6 @@ pub mod pallet {
|
|||||||
NewCodeTooLarge,
|
NewCodeTooLarge,
|
||||||
/// Candidate not in parent context.
|
/// Candidate not in parent context.
|
||||||
CandidateNotInParentContext,
|
CandidateNotInParentContext,
|
||||||
/// The bitfield contains a bit relating to an unassigned availability core.
|
|
||||||
UnoccupiedBitInBitfield,
|
|
||||||
/// Invalid group index in core assignment.
|
/// Invalid group index in core assignment.
|
||||||
InvalidGroupIndex,
|
InvalidGroupIndex,
|
||||||
/// Insufficient (non-majority) backing.
|
/// Insufficient (non-majority) backing.
|
||||||
@@ -265,14 +263,6 @@ impl<T: Config> Pallet<T> {
|
|||||||
// 3. each bitfield has exactly `expected_bits`
|
// 3. each bitfield has exactly `expected_bits`
|
||||||
// 4. signature is valid.
|
// 4. signature is valid.
|
||||||
let signed_bitfields = {
|
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 mut last_index = None;
|
||||||
|
|
||||||
let signing_context = SigningContext {
|
let signing_context = SigningContext {
|
||||||
@@ -299,12 +289,6 @@ impl<T: Config> Pallet<T> {
|
|||||||
Error::<T>::ValidatorIndexOutOfBounds,
|
Error::<T>::ValidatorIndexOutOfBounds,
|
||||||
);
|
);
|
||||||
|
|
||||||
ensure!(
|
|
||||||
occupied_bitmask.clone() & unchecked_bitfield.unchecked_payload().0.clone() ==
|
|
||||||
unchecked_bitfield.unchecked_payload().0,
|
|
||||||
Error::<T>::UnoccupiedBitInBitfield,
|
|
||||||
);
|
|
||||||
|
|
||||||
let validator_public =
|
let validator_public =
|
||||||
&validators[unchecked_bitfield.unchecked_validator_index().0 as usize];
|
&validators[unchecked_bitfield.unchecked_validator_index().0 as usize];
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
spec_name: create_runtime_str!("rococo"),
|
spec_name: create_runtime_str!("rococo"),
|
||||||
impl_name: create_runtime_str!("parity-rococo-v1.8"),
|
impl_name: create_runtime_str!("parity-rococo-v1.8"),
|
||||||
authoring_version: 0,
|
authoring_version: 0,
|
||||||
spec_version: 9105,
|
spec_version: 9106,
|
||||||
impl_version: 0,
|
impl_version: 0,
|
||||||
#[cfg(not(feature = "disable-runtime-api"))]
|
#[cfg(not(feature = "disable-runtime-api"))]
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
|
|||||||
Reference in New Issue
Block a user