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-17591] Support adding an orderer endpoint to existing config #857

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

wuxuer
Copy link
Contributor

@wuxuer wuxuer commented Mar 14, 2020

Description

Modify an existing channel configuration to add an orderer endpoint to an orderer org's config group.

Related issues

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

Signed-off-by: xu wu wuxu1103@163.com

Type of change

  • New feature

Description

Additional details

Related issues

@wuxuer wuxuer requested a review from a team as a code owner March 14, 2020 14:16
@wuxuer wuxuer force-pushed the FAB-17591 branch 3 times, most recently from eeb29d0 to a8ee77b Compare March 16, 2020 10:50

existingOrdererEndpoints = append(existingOrdererEndpoints, endpoint)

// Add anchor peers config value back to application org
Copy link

@caod123 caod123 Mar 16, 2020

Choose a reason for hiding this comment

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

Add orderer endpoints config value back to orderer org

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I will fix it.

@caod123
Copy link

caod123 commented Mar 16, 2020

@hellosmallstone can you also update the example_test update config scenario to reflect adding an orderer endpoint? Thanks!

@wuxuer
Copy link
Contributor Author

wuxuer commented Mar 16, 2020

@hellosmallstone can you also update the example_test update config scenario to reflect adding an orderer endpoint? Thanks!

OK, I will update it.

Description

Modify an existing channel configuration to add an orderer endpoint to an orderer org's config group.

Related issues

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

Signed-off-by: xu wu <wuxu1103@163.com>
@wuxuer
Copy link
Contributor Author

wuxuer commented Mar 17, 2020

@caod123 Hi, I have updated the example_test. Please review it, thx.
For some unknown reason, I can not send you a "Re-request review" info via the web button. Therefore, I add this comment.

@caod123
Copy link

caod123 commented Mar 17, 2020

LGTM +1

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.

nits can be fixed on top.

@caod123 @stephyee

@@ -284,3 +284,40 @@ func addOrdererPolicies(cg *cb.ConfigGroup, policyMap map[string]Policy, modPoli

return addPolicies(cg, policyMap, modPolicy)
}

// AddOrdererEndpoints adds an orderer's endpoint to an existing channel config transaction.
Copy link
Contributor

Choose a reason for hiding this comment

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

AddOrdererEndpoint vs AddOrdererEndpoints - the Doc name doesn't match the function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about it.
I fixed the two nits in #891.

if ordererAddrConfigValue, ok := ordererOrgGroup.Values[EndpointsKey]; ok {
err := proto.Unmarshal(ordererAddrConfigValue.Value, ordererAddrProto)
if err != nil {
return fmt.Errorf("failed unmarshalling orderer org %s's endpoints: %v", orgName, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

two spaces in the message instead of one and we can omit the possessive.

@sykesm sykesm merged commit 1d92fca into hyperledger:master Mar 19, 2020
@wuxuer wuxuer deleted the FAB-17591 branch March 19, 2020 16:43
wuxuer added a commit to wuxuer/fabric that referenced this pull request Mar 20, 2020
Description

Fix nits in function AddOrdererEndpoint which were imported by
hyperledger#857.

Signed-off-by: xu wu <wuxu1103@163.com>
sykesm pushed a commit that referenced this pull request Mar 20, 2020
Description

Fix nits in function AddOrdererEndpoint which were imported by
#857.

Signed-off-by: xu wu <wuxu1103@163.com>
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.

3 participants