Replace use of SectorsMax in bitfield All() calls with MaxInt

This commit is contained in:
Aayush Rajasekaran 2020-09-03 01:07:10 -04:00
parent 32eb647215
commit 9b1eb8f362
2 changed files with 8 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package stmgr
import (
"bytes"
"context"
"math"
"os"
"reflect"
@ -251,7 +252,7 @@ func GetSectorsForWinningPoSt(ctx context.Context, pv ffiwrapper.Verifier, sm *S
return nil, xerrors.Errorf("generating winning post challenges: %w", err)
}
sectors, err := provingSectors.All(miner.SectorsMax)
sectors, err := provingSectors.All(math.MaxInt64)
if err != nil {
return nil, xerrors.Errorf("failed to enumerate all sector IDs: %w", err)
}

View File

@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"math"
"strings"
"time"
@ -746,7 +747,7 @@ func (p *Processor) diffMinerPartitions(ctx context.Context, m minerActorInfo, e
return err
}
recovered, err := partitionDiff.Recovered.All(miner.SectorsMax)
recovered, err := partitionDiff.Recovered.All(math.MaxInt64)
if err != nil {
return err
}
@ -756,7 +757,7 @@ func (p *Processor) diffMinerPartitions(ctx context.Context, m minerActorInfo, e
SectorIDs: recovered,
Event: SectorRecovered,
}
inRecovery, err := partitionDiff.InRecovery.All(miner.SectorsMax)
inRecovery, err := partitionDiff.InRecovery.All(math.MaxInt64)
if err != nil {
return err
}
@ -766,7 +767,7 @@ func (p *Processor) diffMinerPartitions(ctx context.Context, m minerActorInfo, e
SectorIDs: inRecovery,
Event: SectorRecovering,
}
faulted, err := partitionDiff.Faulted.All(miner.SectorsMax)
faulted, err := partitionDiff.Faulted.All(math.MaxInt64)
if err != nil {
return err
}
@ -776,7 +777,7 @@ func (p *Processor) diffMinerPartitions(ctx context.Context, m minerActorInfo, e
SectorIDs: faulted,
Event: SectorFaulted,
}
terminated, err := partitionDiff.Terminated.All(miner.SectorsMax)
terminated, err := partitionDiff.Terminated.All(math.MaxInt64)
if err != nil {
return err
}
@ -786,7 +787,7 @@ func (p *Processor) diffMinerPartitions(ctx context.Context, m minerActorInfo, e
SectorIDs: terminated,
Event: SectorTerminated,
}
expired, err := partitionDiff.Expired.All(miner.SectorsMax)
expired, err := partitionDiff.Expired.All(math.MaxInt64)
if err != nil {
return err
}