Skip to content

Commit

Permalink
Cleanup nv22 MIGRATION-ONLY errors (#287)
Browse files Browse the repository at this point in the history
Cleanup nv22 MIGRATION-ONLY errors
  • Loading branch information
rjan90 authored Jul 10, 2024
1 parent 9c769c7 commit 533224b
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit 533224b

Please sign in to comment.