Skip to content

Commit

Permalink
bump google.golang.org/protobuf v1.34.2 (hyperledger#4898)
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Partanskiy <fredprtnsk@gmail.com>
  • Loading branch information
pfi79 authored and denyeart committed Jun 17, 2024
1 parent e72cc5d commit 3a42aa0
Show file tree
Hide file tree
Showing 76 changed files with 1,491 additions and 980 deletions.
10 changes: 5 additions & 5 deletions core/chaincode/lifecycle/scc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"encoding/gob"
"fmt"

"github.com/hyperledger/fabric/core/ledger"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-chaincode-go/shim"
mspprotos "github.com/hyperledger/fabric-protos-go/msp"
Expand All @@ -25,11 +23,11 @@ import (
"github.com/hyperledger/fabric/core/chaincode/lifecycle/mock"
"github.com/hyperledger/fabric/core/chaincode/persistence"
"github.com/hyperledger/fabric/core/dispatcher"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/msp"
"github.com/pkg/errors"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pkg/errors"
)

var _ = Describe("SCC", func() {
Expand Down Expand Up @@ -1247,6 +1245,8 @@ var _ = Describe("SCC", func() {
chname, ccname, cd, pubState, orgStates := fakeSCCFuncs.CheckCommitReadinessArgsForCall(0)
Expect(chname).To(Equal("test-channel"))
Expect(ccname).To(Equal("name"))
colls, ok := proto.Clone(arg.Collections).(*pb.CollectionConfigPackage)
Expect(ok).To(BeTrue())
Expect(cd).To(Equal(&lifecycle.ChaincodeDefinition{
Sequence: 7,
EndorsementInfo: &lb.ChaincodeEndorsementInfo{
Expand All @@ -1258,7 +1258,7 @@ var _ = Describe("SCC", func() {
ValidationPlugin: "validation-plugin",
ValidationParameter: []byte("validation-parameter"),
},
Collections: arg.Collections,
Collections: colls,
}))
Expect(pubState).To(Equal(fakeStub))
Expect(orgStates).To(HaveLen(2))
Expand Down
5 changes: 4 additions & 1 deletion core/policy/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package policy
import (
"testing"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-protos-go/common"
"github.com/hyperledger/fabric-protos-go/peer"
"github.com/hyperledger/fabric/common/cauthdsl"
Expand Down Expand Up @@ -80,9 +81,11 @@ func TestEvaluator(t *testing.T) {
// SCENARIO: signature policy supplied - good and bad path

spenv := &common.SignaturePolicyEnvelope{}
spenvTmp, ok := proto.Clone(spenv).(*common.SignaturePolicyEnvelope)
require.True(t, ok)
mspenv := protoutil.MarshalOrPanic(&peer.ApplicationPolicy{
Type: &peer.ApplicationPolicy_SignaturePolicy{
SignaturePolicy: spenv,
SignaturePolicy: spenvTmp,
},
})
spp.On("NewPolicy", spenv).Return(okEval, nil).Once()
Expand Down
3 changes: 1 addition & 2 deletions discovery/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,7 @@ func TestClient(t *testing.T) {
mychannel := r.ForChannel("mychannel")
conf, err := mychannel.Config()
require.NoError(t, err)
require.Equal(t, expectedConf.Msps, conf.Msps)
require.Equal(t, expectedConf.Orderers, conf.Orderers)
require.True(t, proto.Equal(expectedConf, conf))
peers, err := mychannel.Peers()
require.NoError(t, err)
// We should see all peers as provided above
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (

require (
github.com/hyperledger/fabric-chaincode-go v0.0.0-20220920210243-7bc6fa0dd58b
google.golang.org/protobuf v1.33.0
google.golang.org/protobuf v1.34.2
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -943,8 +943,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion protoutil/commonutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func TestEnvelopeToConfigUpdate(t *testing.T) {
result, err := EnvelopeToConfigUpdate(env)

require.NoError(t, err, "EnvelopeToConfigUpdate runs without error for valid CONFIG_UPDATE envelope")
require.Equal(t, configUpdateEnv, result, "Correct configUpdateEnvelope returned")
require.True(t, proto.Equal(configUpdateEnv, result), "Correct configUpdateEnvelope returned")

// scenario 2: for invalid envelopes
env = makeEnv([]byte("test bytes"))
Expand Down
4 changes: 2 additions & 2 deletions protoutil/txutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func TestCreateSignedEnvelope(t *testing.T) {
data := &cb.ConfigEnvelope{}
err = proto.Unmarshal(payload.Data, data)
require.NoError(t, err, "Expected payload data to be a config envelope")
require.Equal(t, msg, data, "Payload data does not match expected value")
require.True(t, proto.Equal(msg, data), "Payload data does not match expected value")

_, err = protoutil.CreateSignedEnvelope(cb.HeaderType_CONFIG, channelID,
id, &cb.ConfigEnvelope{}, int32(1), uint64(1))
Expand All @@ -378,7 +378,7 @@ func TestCreateSignedEnvelopeNilSigner(t *testing.T) {
data := &cb.ConfigEnvelope{}
err = proto.Unmarshal(payload.Data, data)
require.NoError(t, err, "Expected payload data to be a config envelope")
require.Equal(t, msg, data, "Payload data does not match expected value")
require.True(t, proto.Equal(msg, data), "Payload data does not match expected value")
}

func TestGetSignedProposal(t *testing.T) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions vendor/google.golang.org/protobuf/encoding/protojson/encode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions vendor/google.golang.org/protobuf/encoding/prototext/encode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions vendor/google.golang.org/protobuf/internal/errors/errors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3a42aa0

Please sign in to comment.