Skip to content

Commit 13792d5

Browse files
pfi79denyeart
authored andcommitted
add new version libs
Signed-off-by: Fedor Partanskiy <[email protected]>
1 parent d7046a1 commit 13792d5

File tree

1,321 files changed

+53052
-32785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,321 files changed

+53052
-32785
lines changed

cmd/common/signer/signer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"strings"
2020

2121
"github.com/hyperledger/fabric-lib-go/bccsp/utils"
22-
"github.com/hyperledger/fabric-protos-go/msp"
22+
"github.com/hyperledger/fabric-protos-go-apiv2/msp"
2323
"github.com/hyperledger/fabric/common/util"
2424
"github.com/hyperledger/fabric/protoutil"
2525
"github.com/pkg/errors"

cmd/configtxgen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/hyperledger/fabric-config/protolator/protoext/peerext"
1919
"github.com/hyperledger/fabric-lib-go/bccsp/factory"
2020
"github.com/hyperledger/fabric-lib-go/common/flogging"
21-
cb "github.com/hyperledger/fabric-protos-go/common"
21+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
2222
"github.com/hyperledger/fabric/internal/configtxgen/encoder"
2323
"github.com/hyperledger/fabric/internal/configtxgen/genesisconfig"
2424
"github.com/hyperledger/fabric/internal/configtxgen/metadata"

cmd/configtxlator/main.go

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ import (
1414
"os"
1515
"reflect"
1616

17-
"github.com/golang/protobuf/proto"
1817
"github.com/gorilla/handlers"
1918
"github.com/hyperledger/fabric-config/protolator"
2019
"github.com/hyperledger/fabric-lib-go/common/flogging"
21-
cb "github.com/hyperledger/fabric-protos-go/common"
22-
_ "github.com/hyperledger/fabric-protos-go/msp"
23-
_ "github.com/hyperledger/fabric-protos-go/orderer"
24-
_ "github.com/hyperledger/fabric-protos-go/orderer/etcdraft"
25-
_ "github.com/hyperledger/fabric-protos-go/peer"
20+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
21+
_ "github.com/hyperledger/fabric-protos-go-apiv2/msp"
22+
_ "github.com/hyperledger/fabric-protos-go-apiv2/orderer"
23+
_ "github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft"
24+
_ "github.com/hyperledger/fabric-protos-go-apiv2/peer"
2625
"github.com/hyperledger/fabric/internal/configtxlator/metadata"
2726
"github.com/hyperledger/fabric/internal/configtxlator/rest"
2827
"github.com/hyperledger/fabric/internal/configtxlator/update"
2928
"github.com/pkg/errors"
29+
"google.golang.org/protobuf/proto"
3030
"google.golang.org/protobuf/reflect/protoreflect"
3131
"google.golang.org/protobuf/reflect/protoregistry"
3232
"gopkg.in/alecthomas/kingpin.v2"
@@ -131,7 +131,7 @@ func encodeProto(msgName string, input, output *os.File) error {
131131
return errors.Wrapf(err, "error encode input")
132132
}
133133

134-
msgType := reflect.TypeOf(proto.MessageV1(mt.Zero().Interface()))
134+
msgType := reflect.TypeOf(mt.Zero().Interface())
135135

136136
if msgType == nil {
137137
return errors.Errorf("message of type %s unknown", msgType)
@@ -143,6 +143,9 @@ func encodeProto(msgName string, input, output *os.File) error {
143143
return errors.Wrapf(err, "error decoding input")
144144
}
145145

146+
if msg == nil {
147+
return errors.New("error marshaling: proto: Marshal called with nil")
148+
}
146149
out, err := proto.Marshal(msg)
147150
if err != nil {
148151
return errors.Wrapf(err, "error marshaling")
@@ -162,7 +165,7 @@ func decodeProto(msgName string, input, output *os.File) error {
162165
return errors.Wrapf(err, "error encode input")
163166
}
164167

165-
msgType := reflect.TypeOf(proto.MessageV1(mt.Zero().Interface()))
168+
msgType := reflect.TypeOf(mt.Zero().Interface())
166169

167170
if msgType == nil {
168171
return errors.Errorf("message of type %s unknown", msgType)
@@ -217,6 +220,9 @@ func computeUpdt(original, updated, output *os.File, channelID string) error {
217220

218221
cu.ChannelId = channelID
219222

223+
if cu == nil {
224+
return errors.New("error marshaling computed config update: proto: Marshal called with nil")
225+
}
220226
outBytes, err := proto.Marshal(cu)
221227
if err != nil {
222228
return errors.Wrapf(err, "error marshaling computed config update")

cmd/osnadmin/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import (
1616
"net/http"
1717
"os"
1818

19-
"github.com/golang/protobuf/proto"
20-
"github.com/hyperledger/fabric-protos-go/common"
19+
"github.com/hyperledger/fabric-protos-go-apiv2/common"
2120
"github.com/hyperledger/fabric/internal/osnadmin"
2221
"github.com/hyperledger/fabric/protoutil"
22+
"google.golang.org/protobuf/proto"
2323
"gopkg.in/alecthomas/kingpin.v2"
2424
)
2525

cmd/osnadmin/main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ import (
1818
"os"
1919
"path/filepath"
2020

21-
"github.com/golang/protobuf/proto"
2221
"github.com/hyperledger/fabric-lib-go/bccsp"
23-
cb "github.com/hyperledger/fabric-protos-go/common"
22+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
2423
"github.com/hyperledger/fabric/cmd/osnadmin/mocks"
2524
"github.com/hyperledger/fabric/common/crypto/tlsgen"
2625
"github.com/hyperledger/fabric/orderer/common/channelparticipation"
@@ -29,6 +28,7 @@ import (
2928
"github.com/hyperledger/fabric/protoutil"
3029
. "github.com/onsi/ginkgo/v2"
3130
. "github.com/onsi/gomega"
31+
"google.golang.org/protobuf/proto"
3232
)
3333

3434
var _ = Describe("osnadmin", func() {

cmd/osnadmin/mocks/channel_management.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/osnadmin/osnadmin_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package main
99
import (
1010
"testing"
1111

12-
cb "github.com/hyperledger/fabric-protos-go/common"
12+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
1313
"github.com/hyperledger/fabric/orderer/common/types"
1414
. "github.com/onsi/ginkgo/v2"
1515
. "github.com/onsi/gomega"

common/capabilities/application.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
77
package capabilities
88

99
import (
10-
cb "github.com/hyperledger/fabric-protos-go/common"
10+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
1111
)
1212

1313
const (

common/capabilities/application_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package capabilities
99
import (
1010
"testing"
1111

12-
cb "github.com/hyperledger/fabric-protos-go/common"
12+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
1313
"github.com/stretchr/testify/require"
1414
)
1515

common/capabilities/capabilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package capabilities
88

99
import (
1010
"github.com/hyperledger/fabric-lib-go/common/flogging"
11-
cb "github.com/hyperledger/fabric-protos-go/common"
11+
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
1212
"github.com/pkg/errors"
1313
)
1414

0 commit comments

Comments
 (0)