Skip to content

Commit

Permalink
mod check for epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu committed Jul 28, 2023
1 parent b775fa8 commit a5290cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actors/miner/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ impl ExpirationQueueStateSummary {
// check expiring sectors are still alive
if let Some(sector) = live_sectors.get(&sector_number) {
let target = quant.quantize_up(sector.expiration);
acc.require(epoch == target || target+quant.unit == epoch, format!("invalid expiration {epoch} for sector {sector_number}, expected {target}"));
acc.require(epoch >= target && (epoch-target)%quant.unit ==0 , format!("invalid expiration {epoch} for sector {sector_number}, expected {target}"));
on_time_sectors_pledge += sector.initial_pledge.clone();
} else {
acc.add(format!("on time expiration sector {sector_number} isn't live"));
Expand Down

0 comments on commit a5290cc

Please sign in to comment.