Skip to content

Commit

Permalink
Fix the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGround0 committed May 22, 2024
1 parent fb65f28 commit a3e9705
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions actors/miner/tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,10 @@ impl ActorHarness {
CompactCommD::empty()
} else {
let piece_cids: Vec<Cid> = deal_ids[i]
.iter()
.map(|_deal_id| make_piece_cid(sector_no, i, DEFAULT_PIECE_SIZE))
.iter().enumerate()
.map(|(j, _deal_id)| {
make_piece_cid(sector_no, j, DEFAULT_PIECE_SIZE)
})
.collect();

sector_commd_from_pieces(&piece_cids)
Expand Down Expand Up @@ -3176,6 +3178,7 @@ fn make_unsealed_cid(input: &[u8]) -> Cid {

// Makes a fake piece CID that is unique for sector number, piece index, and piece size.
fn make_piece_cid(sector_number: SectorNumber, index: usize, size: u64) -> Cid {
println!("piece-{}-{}-{}", sector_number, index, size);
make_unsealed_cid(format!("piece-{}-{}-{}", sector_number, index, size).as_bytes())
}

Expand Down

0 comments on commit a3e9705

Please sign in to comment.