Skip to content

Commit ed02898

Browse files
author
Jason Yellick
committed
[FAB-6696] Fix printOrg output to deeply marshal
The configtxgen -printOrg function currently prints a version of the organization definition with the MSP definition opaque. This is a problem for the configtxlator APIs which expect for the JSON to be deeply marshaled. This CR simply fixes the printing by changing the type passed in to be the proper annotated dynamic type, rather than the base ConfigGroup type. Change-Id: I7952ad7c052f6f063ab747f323c2ab531340887f Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent e4cb863 commit ed02898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/tools/configtxgen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func doPrintOrg(t *genesisconfig.TopLevel, printOrg string) error {
213213
return errors.Wrapf(err, "bad org definition for org %s", org.Name)
214214
}
215215

216-
if err := protolator.DeepMarshalJSON(os.Stdout, og); err != nil {
216+
if err := protolator.DeepMarshalJSON(os.Stdout, &cb.DynamicConsortiumOrgGroup{ConfigGroup: og}); err != nil {
217217
return errors.Wrapf(err, "malformed org definition for org: %s", org.Name)
218218
}
219219
return nil

0 commit comments

Comments
 (0)