Update fsm adapter

This commit is contained in:
Łukasz Magiera 2020-06-04 15:54:36 +02:00
parent bbb954afc5
commit c625b30781
2 changed files with 6 additions and 2 deletions

View File

@ -120,7 +120,7 @@ func (sm *StorageMinerAPI) SectorsStatus(ctx context.Context, sid abi.SectorNumb
Value: info.SeedValue, Value: info.SeedValue,
Epoch: info.SeedEpoch, Epoch: info.SeedEpoch,
}, },
Retries: info.Nonce, Retries: info.InvalidProofs,
LastErr: info.LastErr, LastErr: info.LastErr,
Log: log, Log: log,

View File

@ -163,9 +163,13 @@ func (s SealingAPIAdapter) StateSectorPreCommitInfo(ctx context.Context, maddr a
} }
var pci miner.SectorPreCommitOnChainInfo var pci miner.SectorPreCommitOnChainInfo
if _, err := precommits.Get(adt.UIntKey(uint64(sectorNumber)), &pci); err != nil { ok, err := precommits.Get(adt.UIntKey(uint64(sectorNumber)), &pci)
if err != nil {
return nil, err return nil, err
} }
if !ok {
return nil, nil
}
return &pci, nil return &pci, nil
} }