Skip to content

Commit

Permalink
Remove refs to removed miner summary field
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGround0 committed Sep 3, 2023
1 parent a69e484 commit ecd81d7
Showing 1 changed file with 2 additions and 54 deletions.
56 changes: 2 additions & 54 deletions state/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ fn check_deal_states_against_sectors(
continue;
}

let miner_summary = if let Some(miner_summary) = miner_summaries.get(&deal.provider) {
let _miner_summary = if let Some(miner_summary) = miner_summaries.get(&deal.provider) {
miner_summary
} else {
acc.add(format!(
Expand All @@ -350,51 +350,6 @@ fn check_deal_states_against_sectors(
));
continue;
};

let sector_deal = if let Some(sector_deal) = miner_summary.deals.get(deal_id) {
sector_deal
} else {
acc.require(
deal.slash_epoch >= 0,
format!(
"un-slashed deal {deal_id} not referenced in active sectors of miner {}",
deal.provider
),
);
continue;
};

acc.require(
deal.sector_start_epoch >= sector_deal.sector_start,
format!(
"deal state start {} does not match sector start {} for miner {}",
deal.sector_start_epoch, sector_deal.sector_start, deal.provider
),
);

acc.require(
deal.sector_start_epoch <= sector_deal.sector_expiration,
format!(
"deal state start {} activated after sector expiration {} for miner {}",
deal.sector_start_epoch, sector_deal.sector_expiration, deal.provider
),
);

acc.require(
deal.last_update_epoch <= sector_deal.sector_expiration,
format!(
"deal state update at {} after sector expiration {} for miner {}",
deal.last_update_epoch, sector_deal.sector_expiration, deal.provider
),
);

acc.require(
deal.slash_epoch <= sector_deal.sector_expiration,
format!(
"deal state slashed at {} after sector expiration {} for miner {}",
deal.slash_epoch, sector_deal.sector_expiration, deal.provider
),
);
}
}

Expand Down Expand Up @@ -544,13 +499,6 @@ fn check_verifreg_against_miners(
Some(summary) => summary,
};

// all claims are linked to a valid sector number
acc.require(
miner_summary.sectors_with_deals.get(&claim.sector).is_some(),
format!(
"claim sector number {} not recorded as a sector with deals for miner {}",
claim.sector, maddr
),
);
// XXX all claims are linked to a valid sector number
}
}

0 comments on commit ecd81d7

Please sign in to comment.