Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow miner to disable/enable consideration of received storage deal proposals #1994

Merged
merged 6 commits into from
Jun 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better rejection messages
  • Loading branch information
laser committed Jun 11, 2020
commit c458b4712a806639ba9dcdb3c64c0133d19f31a2
5 changes: 3 additions & 2 deletions node/modules/storageminer.go
Original file line number Diff line number Diff line change
@@ -315,11 +315,12 @@ func StorageProvider(minerAddress dtypes.MinerAddress, ffiConfig *ffiwrapper.Con
opt := storageimpl.CustomDealDecisionLogic(func(ctx context.Context, deal storagemarket.MinerDeal) (bool, string, error) {
willEntertainProposals, err := isAcceptingStorageDealsFunc()
if err != nil {
return false, "IsAcceptingStorageDealsFunc error", err
return false, "miner error", err
}

if !willEntertainProposals {
return false, "user has disabled storage deals", nil
log.Warnf("storage deal acceptance disabled; rejecting storage deal proposal from client: %s", deal.Client.String())
return false, "miner is not accepting storage deals", nil
}

return true, "", nil