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

Filter out unsupported proposals #606

Merged
merged 5 commits into from
Dec 11, 2018
Merged

Conversation

tadovas
Copy link
Contributor

@tadovas tadovas commented Dec 10, 2018

The main idea how to handle proposals of uknown service,payment or contact types.
Proposal is considered unsupported if one of the following is true:

  • Unknown service type
  • Unnown payment type
  • All contact types in contact list are unknown.

Such proposals will be filtered out and not returned by tequilapi

@tadovas
Copy link
Contributor Author

tadovas commented Dec 10, 2018

As part of this feature I am planning to refactor our discovery communication code (get rid of packages like "server" and to extract consumer and provider related code to separate packages)

vkuznecovas
vkuznecovas previously approved these changes Dec 10, 2018
return UnsupportedContactType{}
}
definition, er := fn(rawMessage)
if er != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

er? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

really? :) fine :)

"github.com/mysteriumnetwork/node/money"
)

// PaymentMethod is a marker interface for all types of payment methods
Copy link
Contributor

Choose a reason for hiding this comment

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

just interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed markers

@tadovas tadovas force-pushed the feature/handle-unsupported-proposals branch from 99af05e to 94dead9 Compare December 10, 2018 15:57
zolia
zolia previously approved these changes Dec 10, 2018
Copy link
Contributor

@zolia zolia left a comment

Choose a reason for hiding this comment

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

lgtm

service_discovery/dto/contact.go Outdated Show resolved Hide resolved
service_discovery/dto/contact.go Outdated Show resolved Hide resolved
service_discovery/dto/payment_method.go Outdated Show resolved Hide resolved
service_discovery/dto/payment_method.go Outdated Show resolved Hide resolved
service_discovery/dto/payment_method.go Outdated Show resolved Hide resolved
service_discovery/dto/service_definition.go Outdated Show resolved Hide resolved
service_discovery/dto/service_definition.go Show resolved Hide resolved
service_discovery/dto/service_proposal.go Outdated Show resolved Hide resolved
@tadovas tadovas force-pushed the feature/handle-unsupported-proposals branch from 8bca9ad to 9cb77dc Compare December 11, 2018 08:11
@tadovas
Copy link
Contributor Author

tadovas commented Dec 11, 2018

@zolia @vkuznecovas @soffokl ready again

@zolia zolia merged commit b530b5d into master Dec 11, 2018
@zolia zolia deleted the feature/handle-unsupported-proposals branch December 11, 2018 13:19
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.

4 participants