Files
pezkuwi-sdk/pezbridges/pezsnowbridge/primitives/beacon/src/bits.rs
T
Kurdistan Tech Ministry 3ddf58cef9 fix: EnsureOrigin try_successful_origin and snowbridge rename
- Fix pezpallet-welati EnsureOrigin implementations (3 fixes)
  - Remove incorrect #[cfg(not(feature = "runtime-benchmarks"))] blocks
  - Affects EnsureSerok, EnsureParlementer, EnsureDiwan

- Fix asset-hub-zagros governance origins macros (2 fixes)
  - Remove non-benchmark try_successful_origin from decl_unit_ensures!
  - Remove non-benchmark try_successful_origin from decl_ensure!

- Rename snowbridge -> pezsnowbridge for consistency

- Update WORKFLOW_PLAN.md with build status and package names
  - Correct package names: pezkuwi-teyrchain-bin, pezstaging-node-cli
  - Mark completed builds: pezkuwi, pezkuwi-teyrchain-bin,
    pezstaging-node-cli, teyrchain-template-node
2025-12-25 01:26:18 +03:00

20 lines
576 B
Rust

// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
use pezsp_std::prelude::*;
use ssz_rs::{Bitvector, Deserialize};
pub fn decompress_sync_committee_bits<
const SYNC_COMMITTEE_SIZE: usize,
const SYNC_COMMITTEE_BITS_SIZE: usize,
>(
input: [u8; SYNC_COMMITTEE_BITS_SIZE],
) -> [u8; SYNC_COMMITTEE_SIZE] {
Bitvector::<{ SYNC_COMMITTEE_SIZE }>::deserialize(&input)
.expect("checked statically; qed")
.iter()
.map(|bit| u8::from(bit == true))
.collect::<Vec<u8>>()
.try_into()
.expect("checked statically; qed")
}