Merge pull request #4902 from GFZRZK/GFZRZK/patch/remove_unuseful_code_in_newstorageask

just return storedask.NewStoredAsk to reduce unuseful code
This commit is contained in:
Łukasz Magiera 2020-11-20 16:28:03 +01:00 committed by GitHub
commit 4483d94db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,15 +423,8 @@ func NewStorageAsk(ctx helpers.MetricsCtx, fapi lapi.FullNode, ds dtypes.Metadat
if err != nil {
return nil, err
}
storedAsk, err := storedask.NewStoredAsk(namespace.Wrap(providerDs, datastore.NewKey("/storage-ask")), datastore.NewKey("latest"), spn, address.Address(minerAddress),
return storedask.NewStoredAsk(namespace.Wrap(providerDs, datastore.NewKey("/storage-ask")), datastore.NewKey("latest"), spn, address.Address(minerAddress),
storagemarket.MaxPieceSize(abi.PaddedPieceSize(mi.SectorSize)))
if err != nil {
return nil, err
}
if err != nil {
return storedAsk, err
}
return storedAsk, nil
}
func BasicDealFilter(user dtypes.StorageDealFilter) func(onlineOk dtypes.ConsiderOnlineStorageDealsConfigFunc,