Skip to content

Commit

Permalink
v13: Mute migration comments
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Feb 6, 2024
1 parent 92fe7cc commit 191c05a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions builtin/v13/migration/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
"errors"
"fmt"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-amt-ipld/v4"
"github.com/filecoin-project/go-state-types/abi"
Expand Down Expand Up @@ -229,14 +228,14 @@ func (m *marketMigrator) migrateProviderSectorsAndStatesWithDiff(ctx context.Con
newState.SectorNumber = si
}

fmt.Printf("add deal %d to sector %d\n", deal, newState.SectorNumber)
//fmt.Printf("add deal %d to sector %d\n", deal, newState.SectorNumber)

if err := prevOutStates.Set(uint64(deal), &newState); err != nil {
return cid.Undef, cid.Undef, xerrors.Errorf("failed to set new state: %w", err)
}

case amt.Remove:
fmt.Printf("remove deal %d\n", deal)
//fmt.Printf("remove deal %d\n", deal)

ok, err := prevOutStates.Get(uint64(deal), &newState)
if err != nil {
Expand Down Expand Up @@ -279,11 +278,11 @@ func (m *marketMigrator) migrateProviderSectorsAndStatesWithDiff(ctx context.Con
// if nowOld.Slash == -1, then 'now' is not slashed, so we should try to find the sector
// we probably don't care about prevOldSlash?? beyond it changing from newSlash?

fmt.Printf("deal %d slash %d -> %d, update %d -> %d (prev sec: %d)\n", deal, prevOldState.SlashEpoch, oldState.SlashEpoch, prevOldState.LastUpdatedEpoch, oldState.LastUpdatedEpoch, newState.SectorNumber)
//fmt.Printf("deal %d slash %d -> %d, update %d -> %d (prev sec: %d)\n", deal, prevOldState.SlashEpoch, oldState.SlashEpoch, prevOldState.LastUpdatedEpoch, oldState.LastUpdatedEpoch, newState.SectorNumber)

if oldState.SlashEpoch != -1 && prevOldState.SlashEpoch == -1 {
// not slashed -> slashed
fmt.Printf("deal %d slash -1 -> %d\n", deal, oldState.SlashEpoch)
//fmt.Printf("deal %d slash -1 -> %d\n", deal, oldState.SlashEpoch)

if err := removeProviderSectorEntry(deal, &newState); err != nil {
return cid.Cid{}, cid.Cid{}, xerrors.Errorf("failed to remove provider sector entry: %w", err)
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 ds 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 ds 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 ds REM %d: %v\n", sectorNo, sector.DealIDs)

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

0 comments on commit 191c05a

Please sign in to comment.