Skip to content

Commit 1246b13

Browse files
author
Jason Yellick
committed
[FAB-2108] Add channel config schema
https://jira.hyperledger.org/browse/FAB-2108 This CR adds the config schema for the channel configuration (which references the application and orderer config schemas). Change-Id: Id75939622e826af0ce4187d59f9b8ba4d16eb7d1 Signed-off-by: Jason Yellick <[email protected]>
1 parent 97338dc commit 1246b13

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

common/configtx/handlers/channel/sharedconfig.go

+25
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,38 @@ import (
2020
"fmt"
2121
"math"
2222

23+
"github.com/hyperledger/fabric/common/configtx/handlers/application"
24+
"github.com/hyperledger/fabric/common/configtx/handlers/orderer"
2325
"github.com/hyperledger/fabric/common/util"
2426
cb "github.com/hyperledger/fabric/protos/common"
2527

2628
"github.com/golang/protobuf/proto"
2729
"github.com/op/go-logging"
2830
)
2931

32+
const (
33+
// ApplicationGroupKey is the group name for the application config
34+
ApplicationGroupKey = "Application"
35+
36+
// OrdererGroupKey is the group name for the orderer config
37+
OrdererGroupKey = "Orderer"
38+
)
39+
40+
var Schema = &cb.ConfigGroupSchema{
41+
Groups: map[string]*cb.ConfigGroupSchema{
42+
ApplicationGroupKey: application.Schema,
43+
OrdererGroupKey: orderer.Schema,
44+
},
45+
Values: map[string]*cb.ConfigValueSchema{
46+
HashingAlgorithmKey: nil,
47+
BlockDataHashingStructureKey: nil,
48+
OrdererAddressesKey: nil,
49+
},
50+
Policies: map[string]*cb.ConfigPolicySchema{
51+
// TODO, set appropriately once hierarchical policies are implemented
52+
},
53+
}
54+
3055
// Chain config keys
3156
const (
3257
// HashingAlgorithmKey is the cb.ConfigItem type key name for the HashingAlgorithm message

0 commit comments

Comments
 (0)