Skip to content

Commit adb66f7

Browse files
committed
Tidy up some peer channel create code
Change-Id: I2066d2ce5260ebf58798aaac12758eca57375685 Signed-off-by: Yacov Manevich <[email protected]>
1 parent bb5a53f commit adb66f7

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

common/configtx/template.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ limitations under the License.
1717
package configtx
1818

1919
import (
20+
"fmt"
21+
22+
"github.com/golang/protobuf/proto"
2023
configtxorderer "github.com/hyperledger/fabric/common/configvalues/channel/orderer"
2124
"github.com/hyperledger/fabric/common/util"
25+
"github.com/hyperledger/fabric/msp"
2226
cb "github.com/hyperledger/fabric/protos/common"
2327
ab "github.com/hyperledger/fabric/protos/orderer"
2428
"github.com/hyperledger/fabric/protos/utils"
25-
26-
"fmt"
27-
28-
"github.com/golang/protobuf/proto"
29-
"github.com/hyperledger/fabric/msp"
3029
)
3130

3231
const (

peer/channel/create.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ func createCmd(cf *ChannelCmdFactory) *cobra.Command {
6060
}
6161

6262
func createChannelFromDefaults(cf *ChannelCmdFactory) (*cb.Envelope, error) {
63-
oTemplate := configtxtest.OrdererTemplate()
64-
oOrgTemplate := configtxtest.OrdererOrgTemplate()
65-
appOrgTemplate := configtxtest.ApplicationOrgTemplate()
66-
67-
chCrtTemp := configtx.NewCompositeTemplate(oTemplate, oOrgTemplate, appOrgTemplate)
63+
chCrtTemp := configtxtest.CompositeTemplate()
6864

6965
signer, err := mspmgmt.GetLocalMSP().GetDefaultSigningIdentity()
7066
if err != nil {

0 commit comments

Comments
 (0)