diff --git a/platform/fabric/core/generic/committer/committer.go b/platform/fabric/core/generic/committer/committer.go index bf8e14baa..9f116ec0d 100644 --- a/platform/fabric/core/generic/committer/committer.go +++ b/platform/fabric/core/generic/committer/committer.go @@ -75,7 +75,7 @@ type CommitTx struct { type TransactionHandler = func(ctx context.Context, block *common.BlockMetadata, tx CommitTx) (*FinalityEvent, error) type OrderingService interface { - SetConfigOrderers(o channelconfig.Orderer, orderers []*grpc.ConnectionConfig) error + Configure(consensusType string, orderers []*grpc.ConnectionConfig) error } type Committer struct { @@ -904,7 +904,7 @@ func (c *Committer) applyBundle(bundle *channelconfig.Bundle) error { } if len(newOrderers) != 0 { c.logger.Debugf("[Channel: %s] Updating the list of orderers: (%d) found", c.ChannelConfig.ID(), len(newOrderers)) - return c.OrderingService.SetConfigOrderers(ordererConfig, newOrderers) + return c.OrderingService.Configure(ordererConfig.ConsensusType(), newOrderers) } c.logger.Infof("[Channel: %s] No orderers found in Channel config", c.ChannelConfig.ID()) diff --git a/platform/fabric/core/generic/ordering/ordering.go b/platform/fabric/core/generic/ordering/ordering.go index 14dabc626..0a7091027 100644 --- a/platform/fabric/core/generic/ordering/ordering.go +++ b/platform/fabric/core/generic/ordering/ordering.go @@ -14,11 +14,9 @@ import ( "github.com/hyperledger-labs/fabric-smart-client/platform/common/services/logging" "github.com/hyperledger-labs/fabric-smart-client/platform/fabric/core/generic/metrics" "github.com/hyperledger-labs/fabric-smart-client/platform/fabric/driver" - "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/flogging" "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/grpc" "github.com/hyperledger-labs/fabric-smart-client/platform/view/view" common2 "github.com/hyperledger/fabric-protos-go/common" - "github.com/hyperledger/fabric/common/channelconfig" "github.com/pkg/errors" "go.uber.org/zap/zapcore" context2 "golang.org/x/net/context" @@ -138,8 +136,8 @@ func (o *Service) SetConsensusType(consensusType ConsensusType) error { return nil } -func (f *Service) SetConfigOrderers(o channelconfig.Orderer, orderers []*grpc.ConnectionConfig) error { - if err := f.SetConsensusType(o.ConsensusType()); err != nil { +func (f *Service) Configure(consensusType string, orderers []*grpc.ConnectionConfig) error { + if err := f.SetConsensusType(consensusType); err != nil { return errors.WithMessagef(err, "failed to set consensus type from channel config") } if err := f.ConfigService.SetConfigOrderers(orderers); err != nil {