Skip to content

Commit

Permalink
v13 more migration debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Feb 8, 2024
1 parent 4be4b30 commit b4466b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions builtin/v13/migration/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,12 @@ func (m *marketMigrator) migrateProviderSectorsAndStatesFromScratch(ctx context.
}
providerSectorsMem[sid.Miner][sid.Number] = append(providerSectorsMem[sid.Miner][sid.Number], deal)
} else {
fmt.Printf("deal %d not found in providerSectors: %v\n", deal, oldState)

newState.SectorNumber = 0 // FIP: if such a sector cannot be found, assert that the deal's end epoch has passed and use sector ID 0
}
} else {
fmt.Printf("deal %d slashed, not inserting ProviderSectors record: %v\n", deal, oldState)
}

if err := newStateArray.Set(uint64(deal), &newState); err != nil {
Expand Down
6 changes: 3 additions & 3 deletions builtin/v13/migration/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (m *minerMigrator) MigrateState(ctx context.Context, store cbor.IpldStore,
continue
}

//fmt.Printf("prov ds ADD %d: %v\n", sectorNo, sector.DealIDs)
fmt.Printf("prov dealsector ADD %d: %v\n", sectorNo, sector.DealIDs)

m.providerSectors.lk.Lock()
for _, dealID := range sector.DealIDs {
Expand Down Expand Up @@ -164,7 +164,7 @@ func (m *minerMigrator) MigrateState(ctx context.Context, store cbor.IpldStore,
}
// snap

//fmt.Printf("prov ds MOD %d: %v -> %v\n", sectorNo, sectorBefore.DealIDs, sectorAfter.DealIDs)
fmt.Printf("prov dealsector MOD %d: %v -> %v\n", sectorNo, sectorBefore.DealIDs, sectorAfter.DealIDs)

m.providerSectors.lk.Lock()
for _, dealID := range sectorAfter.DealIDs {
Expand Down Expand Up @@ -193,7 +193,7 @@ func (m *minerMigrator) MigrateState(ctx context.Context, store cbor.IpldStore,
continue
}

//fmt.Printf("prov ds REM %d: %v\n", sectorNo, sector.DealIDs)
fmt.Printf("prov dealsector REM %d: %v\n", sectorNo, sector.DealIDs)

m.providerSectors.lk.Lock()
for _, dealID := range sector.DealIDs {
Expand Down

0 comments on commit b4466b2

Please sign in to comment.