Skip to content

Commit

Permalink
[FAB-2108] Add channel config schema
Browse files Browse the repository at this point in the history
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 <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Feb 11, 2017
1 parent 97338dc commit 1246b13
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions common/configtx/handlers/channel/sharedconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,38 @@ import (
"fmt"
"math"

"github.com/hyperledger/fabric/common/configtx/handlers/application"
"github.com/hyperledger/fabric/common/configtx/handlers/orderer"
"github.com/hyperledger/fabric/common/util"
cb "github.com/hyperledger/fabric/protos/common"

"github.com/golang/protobuf/proto"
"github.com/op/go-logging"
)

const (
// ApplicationGroupKey is the group name for the application config
ApplicationGroupKey = "Application"

// OrdererGroupKey is the group name for the orderer config
OrdererGroupKey = "Orderer"
)

var Schema = &cb.ConfigGroupSchema{
Groups: map[string]*cb.ConfigGroupSchema{
ApplicationGroupKey: application.Schema,
OrdererGroupKey: orderer.Schema,
},
Values: map[string]*cb.ConfigValueSchema{
HashingAlgorithmKey: nil,
BlockDataHashingStructureKey: nil,
OrdererAddressesKey: nil,
},
Policies: map[string]*cb.ConfigPolicySchema{
// TODO, set appropriately once hierarchical policies are implemented
},
}

// Chain config keys
const (
// HashingAlgorithmKey is the cb.ConfigItem type key name for the HashingAlgorithm message
Expand Down

0 comments on commit 1246b13

Please sign in to comment.