diff --git a/peer/channel/channel.go b/peer/channel/channel.go index c418651efc6..2c8b25c1278 100644 --- a/peer/channel/channel.go +++ b/peer/channel/channel.go @@ -100,10 +100,6 @@ func InitCmdFactory(isOrdererRequired bool) (*ChannelCmdFactory, error) { return common.GetBroadcastClient(orderingEndpoint, tls, caFile) } - if err != nil { - return nil, fmt.Errorf("Error getting broadcast client: %s", err) - } - //for join, we need the endorser as well if isOrdererRequired { cmdFact.EndorserClient, err = common.GetEndorserClient() diff --git a/peer/channel/create.go b/peer/channel/create.go index 3f9ae23d1ed..443a79dfc2a 100644 --- a/peer/channel/create.go +++ b/peer/channel/create.go @@ -158,7 +158,7 @@ func sendCreateChainTransaction(cf *ChannelCmdFactory) error { var broadcastClient common.BroadcastClient broadcastClient, err = cf.BroadcastFactory() if err != nil { - return err + return fmt.Errorf("Error getting broadcast client: %s", err) } defer broadcastClient.Close()