Skip to content

Commit

Permalink
Remove array_windows feature to be closer to stable rust (#606)
Browse files Browse the repository at this point in the history
Co-authored-by: Preston Evans <[email protected]>
  • Loading branch information
citizen-stig and preston-evans98 committed Sep 14, 2023
1 parent b161269 commit 785c0e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion adapters/celestia/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(array_windows)]
pub mod celestia;
pub mod shares;
pub use celestia::*;
Expand Down
6 changes: 4 additions & 2 deletions adapters/celestia/src/verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ impl da::DaVerifier for CelestiaVerifier {

// Verify each sub-proof and flatten the shares back into a sequential array
// First, enforce that the sub-proofs cover a contiguous range of shares
for [l, r] in tx_proof.proof.array_windows::<2>() {
assert_eq!(l.start_share_idx + l.shares.len(), r.start_share_idx)
for i in 1..tx_proof.proof.len() {
let l = &tx_proof.proof[i - 1];
let r = &tx_proof.proof[i];
assert_eq!(l.start_share_idx + l.shares.len(), r.start_share_idx);
}
let mut tx_shares = Vec::new();
// Then, verify the sub proofs
Expand Down

0 comments on commit 785c0e5

Please sign in to comment.