diff --git a/api/apifabclient/channel.go b/api/apifabclient/channel.go index dbeafa94dc..3304db0bbd 100644 --- a/api/apifabclient/channel.go +++ b/api/apifabclient/channel.go @@ -31,6 +31,7 @@ type Channel interface { Initialize(data []byte) error IsInitialized() bool LoadConfigUpdateEnvelope(data []byte) error + ChannelConfig() (*common.ConfigEnvelope, error) SendInstantiateProposal(chaincodeName string, args [][]byte, chaincodePath string, chaincodeVersion string, chaincodePolicy *common.SignaturePolicyEnvelope, targets []txn.ProposalProcessor) ([]*txn.TransactionProposalResponse, txn.TransactionID, error) SendUpgradeProposal(chaincodeName string, args [][]byte, chaincodePath string, chaincodeVersion string, chaincodePolicy *common.SignaturePolicyEnvelope, targets []txn.ProposalProcessor) ([]*txn.TransactionProposalResponse, txn.TransactionID, error) diff --git a/pkg/fabric-client/channel/config.go b/pkg/fabric-client/channel/config.go index db9a3d9deb..f6a13e17b1 100644 --- a/pkg/fabric-client/channel/config.go +++ b/pkg/fabric-client/channel/config.go @@ -52,7 +52,7 @@ func (c *Channel) Initialize(configUpdate []byte) error { return nil } - configEnvelope, err := c.channelConfig() + configEnvelope, err := c.ChannelConfig() if err != nil { return errors.WithMessage(err, "channel configuration retrieval from orderer failed") } @@ -119,14 +119,12 @@ func (c *Channel) initializeFromConfig(configItems *configItems) error { return nil } -/** -* Queries for the current config block for this channel. -* This transaction will be made to the orderer. -* @returns {ConfigEnvelope} Object containing the configuration items. -* @see /protos/orderer/ab.proto -* @see /protos/common/configtx.proto - */ -func (c *Channel) channelConfig() (*common.ConfigEnvelope, error) { +// ChannelConfig queries for the current config block for this channel. +// This transaction will be made to the orderer. +// @returns {ConfigEnvelope} Object containing the configuration items. +// @see /protos/orderer/ab.proto +// @see /protos/common/configtx.proto +func (c *Channel) ChannelConfig() (*common.ConfigEnvelope, error) { logger.Debugf("channelConfig - start for channel %s", c.name) // Get the newest block