func NewFromGRPC(ctx context.Context, conn *grpc.ClientConn, identity msp.SigningIdentity, log *zap.Logger) api.DeliverClient {
	l := log.Named(`NewFromGRPC`)
	l.Debug(`Using presented GRPC connection`, zap.String(`target`, conn.Target()))
	l.Debug(`Using presented identity`, zap.String(`msp_id`, identity.GetMSPIdentifier()), zap.String(`id`, identity.GetIdentifier().Id))

	newCtx, cancel := context.WithCancel(ctx)

	return &deliverClient{
		ctx:           newCtx,
		cancel:        cancel,
		log:           l,
		uri:           conn.Target(),
		conn:          conn,
		identity:      identity,
		blockSubStore: make(map[string]*dcBlockSub),
	}
}
// NewFromGRPC allows to initialize orderer from existing GRPC connection
NewFromGRPC allows to initialize orderer from existing GRPC connection
// NewFromGRPC allows to initialize orderer from existing GRPC connection
func NewFromGRPC(ctx context.Context, conn *grpc.ClientConn, identity msp.SigningIdentity, log *zap.Logger) api.DeliverClient {
	l := log.Named(`NewFromGRPC`)
	l.Debug(`Using presented GRPC connection`, zap.String(`target`, conn.Target()))
	l.Debug(`Using presented identity`, zap.String(`msp_id`, identity.GetMSPIdentifier()), zap.String(`id`, identity.GetIdentifier().Id))
	newCtx, cancel := context.WithCancel(ctx)
	return &deliverClient{
		ctx:           newCtx,
		cancel:        cancel,
		log:           l,
		uri:           conn.Target(),
		conn:          conn,
		identity:      identity,
		blockSubStore: make(map[string]*dcBlockSub),
	}
}
func NewFromGRPC ( ctx context . Context , conn * grpc . ClientConn , identity msp . SigningIdentity , log * zap . Logger ) api . DeliverClient { l := log . Named ( `NewFromGRPC` ) l . Debug ( `Using presented GRPC connection` , zap . String ( `target` , conn . Target ( ) ) ) l . Debug ( `Using presented identity` , zap . String ( `msp_id` , identity . GetMSPIdentifier ( ) ) , zap . String ( `id` , identity . GetIdentifier ( ) . Id ) ) newCtx , cancel := context . WithCancel ( ctx ) return & deliverClient { ctx : newCtx , cancel : cancel , log : l , uri : conn . Target ( ) , conn : conn , identity : identity , blockSubStore : make ( map [ string ] * dcBlockSub ) , } }
NewFromGRPC allows to initialize orderer from existing GRPC connection
NewFromGRPC allows to initialize orderer from existing GRPC connection