Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Cleanup invariant errors related to v13 migration #287

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions builtin/v13/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,8 @@ func CheckDealStatesAgainstSectors(acc *builtin.MessageAccumulator, minerSummari
continue
}

// TODO: If you are reading this error after nv22 (v13 actors), delete this invariant.
// It exists to test the v13 migration ONLY.
sectorDeal, found := minerSummary.Deals[dealID]
if !found {
acc.Require(deal.SlashEpoch >= 0, "MIGRATION-ONLY: un-slashed deal %d not referenced in active sectors of miner %v", dealID, deal.Provider)
continue
}

Expand Down Expand Up @@ -314,9 +311,9 @@ func CheckDealStatesAgainstSectors(acc *builtin.MessageAccumulator, minerSummari

for _, dealID := range dealIDs {
_, found := minerSummary.Deals[dealID]
// TODO: If you are reading this error after nv22 (v13 actors), delete this invariant.
// It exists to test the v13 migration ONLY.
acc.Require(found, "MIGRATION-ONLY: deal %d not found in miner %v for sector %v", dealID, maddr, sectorID)
if !found {
continue
}

_, found = marketDealToSector[dealID]
acc.Require(!found, "deal %d found in multiple sectors", dealID)
Expand Down