Skip to content

Commit af5f75d

Browse files
committed
Revert "Upgrade go protobuff from 3-beta to 3"
This reverts commit a98c59a. We are experiencing several failures related to this merge, so lets revert it for now and re-group Change-Id: Ia476f7247a6ac68aacd34a609d79d3556260e0b0 Signed-off-by: Greg Haskins <[email protected]>
1 parent a087441 commit af5f75d

File tree

720 files changed

+9621
-164760
lines changed

Some content is hidden

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

720 files changed

+9621
-164760
lines changed

Makefile

+4-14
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ JAVASHIM_DEPS = $(shell git ls-files core/chaincode/shim/java)
7171
PROJECT_FILES = $(shell git ls-files)
7272
IMAGES = base src ccenv peer membersrvc javaenv
7373

74-
PROTOS=$(shell find . -name "*.proto" | grep -v "vendor" | grep -v "shim/java" | grep -v "/sdk")
75-
76-
PB_GOS=$(patsubst %.proto,%.pb.go,${PROTOS})
7774

7875
all: peer membersrvc checks
7976

@@ -184,15 +181,13 @@ build/image/base/.dummy: $(BASEIMAGE_DEPS)
184181
@touch $@
185182

186183
# Special override for src-image
187-
build/image/src/.dummy: $(PB_GOS) build/image/base/.dummy $(PROJECT_FILES)
184+
build/image/src/.dummy: build/image/base/.dummy $(PROJECT_FILES)
188185
@echo "Building docker src-image"
189186
@mkdir -p $(@D)
190187
@cat images/src/Dockerfile.in \
191188
| sed -e 's/_TAG_/$(DOCKER_TAG)/g' \
192189
> $(@D)/Dockerfile
193-
@git ls-files > $(@D)/file_list.txt
194-
@find . -name "*.pb.go" | grep -v vendor >> $(@D)/file_list.txt
195-
@cat $(@D)/file_list.txt | tar -jcT - > $(@D)/gopath.tar.bz2
190+
@git ls-files | tar -jcT - > $(@D)/gopath.tar.bz2
196191
docker build -t $(PROJECT_NAME)-src $(@D)
197192
docker tag $(PROJECT_NAME)-src $(PROJECT_NAME)-src:$(DOCKER_TAG)
198193
@touch $@
@@ -236,13 +231,8 @@ build/image/%/.dummy: build/image/src/.dummy build/docker/bin/%
236231
@touch $@
237232

238233
.PHONY: protos
239-
protos: gotools ${PB_GOS}
240-
241-
242-
%.pb.go: %.proto
243-
protoc --proto_path=$(abspath $(@D)) --go_out=plugins=grpc:$(abspath $(@D)) $(abspath $(@D)/*.proto)
244-
245-
234+
protos: gotools
235+
./devenv/compile_protos.sh
246236

247237
base-image-clean:
248238
-docker rmi -f $(PROJECT_NAME)-baseimage

consensus/pbft/batch.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ package pbft
1818

1919
import (
2020
"fmt"
21+
"google/protobuf"
2122
"time"
2223

2324
"github.com/hyperledger/fabric/consensus"
2425
"github.com/hyperledger/fabric/consensus/util/events"
2526
pb "github.com/hyperledger/fabric/protos"
2627

2728
"github.com/golang/protobuf/proto"
28-
"github.com/golang/protobuf/ptypes/timestamp"
2929
"github.com/op/go-logging"
3030
"github.com/spf13/viper"
3131
)
@@ -242,7 +242,7 @@ func (op *obcBatch) sendBatch() events.Event {
242242
func (op *obcBatch) txToReq(tx []byte) *Request {
243243
now := time.Now()
244244
req := &Request{
245-
Timestamp: &timestamp.Timestamp{
245+
Timestamp: &google_protobuf.Timestamp{
246246
Seconds: now.Unix(),
247247
Nanos: int32(now.UnixNano() % 1000000000),
248248
},

0 commit comments

Comments
 (0)