From 0d864c6568254a951077fb56b00589590859b627 Mon Sep 17 00:00:00 2001 From: Jason Yellick Date: Wed, 7 Jun 2017 10:48:42 -0400 Subject: [PATCH] [FAB-4424] Clarify configtx flag and error The configtxgen tool has a flag "-asOrg" which takes an organization's name, and performs a config update as that org (useful for updating anchor peers only, today). Apparently this flag can be interpretted as requiring the organization's MSP ID, and not name. This CR adds a clarifying "(by name)" to the parameter help, and additionally changes the error message when the org name is not found, to refer to the organization name, and not simply the org. Change-Id: I7c3dfc215d7efbf731ce0fb2464b9bafbd0572cb Signed-off-by: Jason Yellick --- common/configtx/tool/configtxgen/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/configtx/tool/configtxgen/main.go b/common/configtx/tool/configtxgen/main.go index a1f329e1148..951dbd605f5 100644 --- a/common/configtx/tool/configtxgen/main.go +++ b/common/configtx/tool/configtxgen/main.go @@ -112,7 +112,7 @@ func doOutputAnchorPeersUpdate(conf *genesisconfig.Profile, channelID string, ou } if org == nil { - return fmt.Errorf("No org matching: %s", asOrg) + return fmt.Errorf("No organization name matching: %s", asOrg) } anchorPeers := make([]*pb.AnchorPeer, len(org.AnchorPeers)) @@ -335,7 +335,7 @@ func main() { flag.StringVar(&inspectBlock, "inspectBlock", "", "Prints the configuration contained in the block at the specified path") flag.StringVar(&inspectChannelCreateTx, "inspectChannelCreateTx", "", "Prints the configuration contained in the transaction at the specified path") flag.StringVar(&outputAnchorPeersUpdate, "outputAnchorPeersUpdate", "", "Creates an config update to update an anchor peer (works only with the default channel creation, and only for the first update)") - flag.StringVar(&asOrg, "asOrg", "", "Performs the config generation as a particular organization, only including values in the write set that org (likely) has privilege to set") + flag.StringVar(&asOrg, "asOrg", "", "Performs the config generation as a particular organization (by name), only including values in the write set that org (likely) has privilege to set") flag.Parse()