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

[FAB-17307] InitRequired param check for ApproveForMyorg #462

Merged
merged 1 commit into from
Jan 8, 2020

Conversation

satota2
Copy link
Contributor

@satota2 satota2 commented Jan 8, 2020

This patch adds a check mechanism for the InitRequired parameter for the chaincode definition of the current sequence number to ApproveForMyOrg.

Type of change

  • Bug fix

Description

ApproveForMyOrg puts a chaincode definition entry for either the currently defined sequence number or the next sequence number.
According to comments on the current implementation, for the definition of the current sequence number (which means it has been committed), this command should reject the requested definition unless the requested one must match exactly the current one.

However, the current ApproveForMyOrg command does not check the InitRequired parameter, so the operators can update the InitRequired parameter.
When an organization does this update, it returns the chaincode to unapproved status for the organization.

To fix the bug, it is necessary to add a check mechanism for the InitRequired parameter to ApproveForMyOrg.

Related issues

https://jira.hyperledger.org/browse/FAB-17307

This patch adds a check mechanism for the `InitRequired` parameter
for the chaincode definition of the current sequence number to
`ApproveForMyOrg`.

Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
@guoger guoger requested a review from jyellick January 8, 2020 09:08
Copy link
Contributor

@sykesm sykesm left a comment

Choose a reason for hiding this comment

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

LGTM; would like @jyellick to confirm.

@mastersingh24
Copy link
Contributor

LGTM; would like @jyellick to confirm.
LGTM as well

@jyellick
Copy link
Contributor

jyellick commented Jan 8, 2020

Thanks for finding and fixing!

@jyellick jyellick merged commit 69ecb07 into hyperledger:master Jan 8, 2020
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