@@ -38,11 +38,12 @@ func (e InvalidCreateTx) Error() string {
3838 return fmt .Sprintf ("Invalid channel create transaction : %s" , string (e ))
3939}
4040
41+ // deprecated
4142func createCmd (cf * ChannelCmdFactory ) * cobra.Command {
4243 createCmd := & cobra.Command {
4344 Use : "create" ,
44- Short : "Create a channel" ,
45- Long : "Create a channel and write the genesis block to a file." ,
45+ Short : "[DEPRECATED] Create a channel" ,
46+ Long : "[DEPRECATED] Create a channel and write the genesis block to a file. Instead of this command, use Orderer Service Node (OSN) ." ,
4647 RunE : func (cmd * cobra.Command , args []string ) error {
4748 return create (cmd , args , cf )
4849 },
@@ -58,6 +59,7 @@ func createCmd(cf *ChannelCmdFactory) *cobra.Command {
5859 return createCmd
5960}
6061
62+ // deprecated
6163func createChannelFromDefaults (cf * ChannelCmdFactory ) (* cb.Envelope , error ) {
6264 chCrtEnv , err := encoder .MakeChannelCreationTransaction (
6365 channelID ,
@@ -71,6 +73,7 @@ func createChannelFromDefaults(cf *ChannelCmdFactory) (*cb.Envelope, error) {
7173 return chCrtEnv , nil
7274}
7375
76+ // deprecated
7477func createChannelFromConfigTx (configTxFileName string ) (* cb.Envelope , error ) {
7578 cftx , err := os .ReadFile (configTxFileName )
7679 if err != nil {
@@ -80,6 +83,7 @@ func createChannelFromConfigTx(configTxFileName string) (*cb.Envelope, error) {
8083 return protoutil .UnmarshalEnvelope (cftx )
8184}
8285
86+ // deprecated
8387func sanityCheckAndSignConfigTx (envConfigUpdate * cb.Envelope , signer identity.SignerSerializer ) (* cb.Envelope , error ) {
8488 payload , err := protoutil .UnmarshalPayload (envConfigUpdate .Payload )
8589 if err != nil {
@@ -137,6 +141,7 @@ func sanityCheckAndSignConfigTx(envConfigUpdate *cb.Envelope, signer identity.Si
137141 return protoutil .CreateSignedEnvelope (cb .HeaderType_CONFIG_UPDATE , channelID , signer , configUpdateEnv , 0 , 0 )
138142}
139143
144+ // deprecated
140145func sendCreateChainTransaction (cf * ChannelCmdFactory ) error {
141146 var err error
142147 var chCrtEnv * cb.Envelope
@@ -167,6 +172,7 @@ func sendCreateChainTransaction(cf *ChannelCmdFactory) error {
167172 return err
168173}
169174
175+ // deprecated
170176func executeCreate (cf * ChannelCmdFactory ) error {
171177 err := sendCreateChainTransaction (cf )
172178 if err != nil {
@@ -195,6 +201,7 @@ func executeCreate(cf *ChannelCmdFactory) error {
195201 return nil
196202}
197203
204+ // deprecated
198205func getGenesisBlock (cf * ChannelCmdFactory ) (* cb.Block , error ) {
199206 timer := time .NewTimer (timeout )
200207 defer timer .Stop ()
@@ -220,6 +227,7 @@ func getGenesisBlock(cf *ChannelCmdFactory) (*cb.Block, error) {
220227 }
221228}
222229
230+ // deprecated
223231func create (cmd * cobra.Command , args []string , cf * ChannelCmdFactory ) error {
224232 // the global chainID filled by the "-c" command
225233 if channelID == common .UndefinedParamValue {
0 commit comments