addressing comments

This commit is contained in:
Anton Evangelatov 2021-07-06 17:33:47 +02:00
parent 898687ea2e
commit 10dc90f7fe
4 changed files with 2 additions and 5 deletions

View File

@ -105,7 +105,6 @@ func (rpn *retrievalProviderNode) GetChainHead(ctx context.Context) (shared.TipS
} }
func (rpn *retrievalProviderNode) IsUnsealed(ctx context.Context, sectorID abi.SectorNumber, offset abi.UnpaddedPieceSize, length abi.UnpaddedPieceSize) (bool, error) { func (rpn *retrievalProviderNode) IsUnsealed(ctx context.Context, sectorID abi.SectorNumber, offset abi.UnpaddedPieceSize, length abi.UnpaddedPieceSize) (bool, error) {
//TODO(anteva): maybe true? show on chain info??
si, err := rpn.secb.SectorsStatus(ctx, sectorID, false) si, err := rpn.secb.SectorsStatus(ctx, sectorID, false)
if err != nil { if err != nil {
return false, xerrors.Errorf("failed to get sector info: %w", err) return false, xerrors.Errorf("failed to get sector info: %w", err)
@ -121,7 +120,7 @@ func (rpn *retrievalProviderNode) IsUnsealed(ctx context.Context, sectorID abi.S
Miner: abi.ActorID(mid), Miner: abi.ActorID(mid),
Number: sectorID, Number: sectorID,
}, },
ProofType: si.SealProof, //TODO: confirm this is correct ProofType: si.SealProof,
} }
log.Debugf("will call IsUnsealed now sector=%+v, offset=%d, size=%d", sectorID, offset, length) log.Debugf("will call IsUnsealed now sector=%+v, offset=%d, size=%d", sectorID, offset, length)

View File

@ -720,7 +720,6 @@ func StorageAuth(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.Storage
} }
func StorageAuthWithURL(url string) func(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) { func StorageAuthWithURL(url string) func(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) {
log.Infow("Setting auth token based on URL", "url", url)
return func(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) { return func(ctx helpers.MetricsCtx, ca v0api.Common) (sectorstorage.StorageAuth, error) {
s := strings.Split(url, ":") s := strings.Split(url, ":")
if len(s) != 2 { if len(s) != 2 {

View File

@ -118,7 +118,6 @@ func MinerHandler(a api.StorageMiner, permissioned bool) (http.Handler, error) {
mapi = api.PermissionedStorMinerAPI(mapi) mapi = api.PermissionedStorMinerAPI(mapi)
} }
//_, _ = a.ActorAddress(context.Background())
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder() readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
rpcServer := jsonrpc.NewServer(readerServerOpt) rpcServer := jsonrpc.NewServer(readerServerOpt)
rpcServer.Register("Filecoin", mapi) rpcServer.Register("Filecoin", mapi)

View File

@ -47,7 +47,7 @@ func DsKeyToDealID(key datastore.Key) (uint64, error) {
return dealID, nil return dealID, nil
} }
type SectorBuilder interface { // todo: apify, make work remote type SectorBuilder interface {
SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storage.Data, d api.PieceDealInfo) (api.SectorOffset, error) SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storage.Data, d api.PieceDealInfo) (api.SectorOffset, error)
SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error)
} }