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

For a storage deal proposal that is rejected, include rejection reason in client response #182

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

shannonwells
Copy link
Contributor

Closes #176

@codecov-io
Copy link

Codecov Report

Merging #182 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #182   +/-   ##
=======================================
  Coverage   68.61%   68.61%           
=======================================
  Files          37       37           
  Lines        1991     1991           
=======================================
  Hits         1366     1366           
  Misses        528      528           
  Partials       97       97           
Impacted Files Coverage Δ
storagemarket/impl/clientstates/client_fsm.go 100.00% <100.00%> (ø)
storagemarket/impl/clientstates/client_states.go 92.60% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 473c5d1...64b3dfb. Read the comment docs.

Action(func(deal *storagemarket.ClientDeal, state storagemarket.StorageDealStatus) error {
deal.Message = xerrors.Errorf("deal wasn't accepted (State=%d)", state).Error()
Action(func(deal *storagemarket.ClientDeal, state storagemarket.StorageDealStatus, reason string) error {
deal.Message = xerrors.Errorf("deal failed: (State=%d) %s", state, reason).Error()
Copy link
Contributor Author

@shannonwells shannonwells Apr 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this because "deal rejected" is already in the message and the status itself is storagemarket.StorageDealFailing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea agree.

@shannonwells shannonwells marked this pull request as ready for review April 4, 2020 01:01
Copy link
Collaborator

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Action(func(deal *storagemarket.ClientDeal, state storagemarket.StorageDealStatus) error {
deal.Message = xerrors.Errorf("deal wasn't accepted (State=%d)", state).Error()
Action(func(deal *storagemarket.ClientDeal, state storagemarket.StorageDealStatus, reason string) error {
deal.Message = xerrors.Errorf("deal failed: (State=%d) %s", state, reason).Error()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea agree.

@shannonwells shannonwells merged commit a895d5d into master Apr 6, 2020
@shannonwells shannonwells deleted the feat/sm-client-sees-err-#176 branch April 23, 2020 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StorageMarket: Client can see providers error message
3 participants