cleanup from self review

This commit is contained in:
whyrusleeping 2019-08-07 18:23:44 -07:00
parent ba0d648546
commit 95e7b230ec
3 changed files with 1 additions and 9 deletions

View File

@ -377,7 +377,6 @@ func AddToSectorSet(ctx context.Context, cst *hamt.CborIpldStore, ss cid.Cid, se
}
func ValidatePoRep(maddr address.Address, ssize types.BigInt, params *CommitSectorParams) (bool, ActorError) {
log.Infof("VALIDATE POREP: %d %x %x %x %s %d %x", ssize.Uint64(), params.CommR, params.CommD, params.CommRStar, maddr, params.SectorID.Uint64(), params.Proof)
ok, err := sectorbuilder.VerifySeal(ssize.Uint64(), params.CommR, params.CommD, params.CommRStar, maddr, params.SectorID.Uint64(), params.Proof)
if err != nil {
return false, aerrors.Escalate(err, "verify seal failed")

View File

@ -7,8 +7,6 @@ import (
// TODO: really need to get a callbacks API from the rust-sectorbuilder
func (sb *SectorBuilder) pollForSealedSectors(ctx context.Context) {
log.Info("starting sealed sector poller")
defer log.Info("leaving sealed sector polling routine")
watching := make(map[uint64]bool)
staged, err := sb.GetAllStagedSectors()
@ -33,11 +31,10 @@ func (sb *SectorBuilder) pollForSealedSectors(ctx context.Context) {
log.Errorf("in loop: failed to get staged sectors: %s", err)
continue
}
log.Info("num staged sectors: ", len(staged))
for _, s := range staged {
watching[s.SectorID] = true
}
log.Info("len watching: ", len(watching))
for s := range watching {
status, err := sb.SealStatus(s)
@ -46,7 +43,6 @@ func (sb *SectorBuilder) pollForSealedSectors(ctx context.Context) {
continue
}
log.Infof("sector %d has status %d", s, status.SealStatusCode)
if status.SealStatusCode == 0 { // constant pls, zero implies the last step?
delete(watching, s)
sb.sschan <- status

View File

@ -73,18 +73,15 @@ func (m *Miner) Run(ctx context.Context) error {
}
func (m *Miner) handlePostingSealedSectors(ctx context.Context) {
defer log.Info("leaving handle posting sealed sectors routine")
for {
select {
case sinfo, ok := <-m.sb.SealedSectorChan():
log.Info("got a sealed sector notification!")
if !ok {
// TODO: set some state variable so that this state can be
// visible via some status command
log.Warning("sealed sector channel closed, aborting process")
return
}
log.Info("about to send commit sector message: ", sinfo.SectorID, m.maddr)
if err := m.commitSector(ctx, sinfo); err != nil {
log.Errorf("failed to commit sector: %s", err)