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

dcrjson: Reject dup method type registrations. #2417

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Oct 13, 2020

This modifies the registration function to return an error as expected in the case the same method type is registered more than once and adds code to return an error when the parameter type is already registered for some other method type.

The current code allowed the same method type to be registered again so long as it had the same parameter type associated with it, which is not desirable since it might have been registered with a different set of flags and the new registration would simply be ignored.

@davecgh davecgh added this to the 1.7.0 milestone Oct 13, 2020
@davecgh davecgh force-pushed the dcrjson_reject_duplicate_method_type_registrations branch 2 times, most recently from 973c5b8 to 202a8f0 Compare October 13, 2020 22:25
This modifies the registration function to return an error as expected
in the case the same method type is registered more than once and adds
code to return an error when the parameter type is already registered
for some other method type.

The current code allowed the same method type to be registered again so
long as it had the same parameter type associated with it, which is not
desirable since it might have been registered with a different set of
flags and the new registration would simply be ignored.
@davecgh davecgh force-pushed the dcrjson_reject_duplicate_method_type_registrations branch from 202a8f0 to 64b4404 Compare October 15, 2020 22:03
@davecgh davecgh merged commit 64b4404 into decred:master Oct 15, 2020
@davecgh davecgh deleted the dcrjson_reject_duplicate_method_type_registrations branch October 15, 2020 22:08
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.

None yet

3 participants