Skip to content

Commit

Permalink
Merge pull request filecoin-project#4902 from GFZRZK/GFZRZK/patch/rem…
Browse files Browse the repository at this point in the history
…ove_unuseful_code_in_newstorageask

just return storedask.NewStoredAsk to reduce unuseful code
  • Loading branch information
magik6k authored and bibibong committed Jan 7, 2021
1 parent 53ef125 commit 8948878
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions node/modules/storageminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8948878

Please sign in to comment.