-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-2169] Dynamically generate genesis material
https://jira.hyperledger.org/browse/FAB-2169 The peer tests used to rely on composited statically defined configuraiton templates. This CR switches that path to be dynamic and further prepares for the removal of ConfigurationItem. Change-Id: I0f3962c1725ce0fb8e8525622c330c1528ea6859 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
- v3.0.0
- v3.0.0-rc1
- v3.0.0-preview
- v3.0.0-beta
- v2.5.10
- v2.5.9
- v2.5.8
- v2.5.7
- v2.5.6
- v2.5.5
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.1
- v2.5.0
- v2.5.0-beta2
- v2.5.0-beta
- v2.5.0-alpha3
- v2.5.0-alpha2
- v2.5.0-alpha1
- v2.4.9
- v2.4.8
- v2.4.7
- v2.4.6
- v2.4.5
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.4.0-beta
- v2.4.0-alpha
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.15
- v2.2.14
- v2.2.13
- v2.2.12
- v2.2.11
- v2.2.10
- v2.2.9
- v2.2.8
- v2.2.7
- v2.2.6
- v2.2.5
- v2.2.4
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.1
- v2.0.0
- v2.0.0-beta
- v2.0.0-alpha
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.1-rc1
- v1.4.0
- v1.4.0-rc2
- v1.4.0-rc1
- v1.3.0
- v1.3.0-rc1
- v1.2.1
- v1.2.0
- v1.2.0-rc1
- v1.1.1
- v1.1.0
- v1.1.0-rc1
- v1.1.0-preview
- v1.1.0-alpha
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v1.0.0-rc1
- v1.0.0-beta
- v1.0.0-alpha2
- v1.0.0-alpha
Jason Yellick
committed
Feb 14, 2017
1 parent
9f561b8
commit 32b772c
Showing
12 changed files
with
106 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Copyright IBM Corp. 2017 All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package msp | ||
|
||
import ( | ||
cb "github.com/hyperledger/fabric/protos/common" | ||
"github.com/hyperledger/fabric/protos/msp" | ||
"github.com/hyperledger/fabric/protos/utils" | ||
) | ||
|
||
const ( | ||
MSPKey = "MSP" | ||
) | ||
|
||
// TemplateGroupMSP creates an MSP ConfigValue at the given configPath | ||
func TemplateGroupMSP(configPath []string, mspConf *msp.MSPConfig) *cb.ConfigGroup { | ||
result := cb.NewConfigGroup() | ||
intermediate := result | ||
for _, group := range configPath { | ||
intermediate.Groups[group] = cb.NewConfigGroup() | ||
intermediate = intermediate.Groups[group] | ||
} | ||
intermediate.Values[MSPKey] = &cb.ConfigValue{ | ||
Value: utils.MarshalOrPanic(mspConf), | ||
} | ||
return result | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.