github.com/kaituanwang/hyperledger@v2.0.1+incompatible/orderer/sample_clients/broadcast_config/newchain.go (about) 1 // Copyright IBM Corp. All Rights Reserved. 2 // SPDX-License-Identifier: Apache-2.0 3 4 package main 5 6 import ( 7 cb "github.com/hyperledger/fabric-protos-go/common" 8 "github.com/hyperledger/fabric/internal/configtxgen/encoder" 9 "github.com/hyperledger/fabric/internal/configtxgen/genesisconfig" 10 "github.com/hyperledger/fabric/internal/pkg/identity" 11 ) 12 13 func newChainRequest( 14 consensusType, 15 creationPolicy, 16 newChannelID string, 17 signer identity.SignerSerializer, 18 ) *cb.Envelope { 19 env, err := encoder.MakeChannelCreationTransaction( 20 newChannelID, 21 signer, 22 genesisconfig.Load(genesisconfig.SampleSingleMSPChannelProfile), 23 ) 24 if err != nil { 25 panic(err) 26 } 27 return env 28 }