Skip to content

Commit

Permalink
[FABG-847] Combine protos into third_party module
Browse files Browse the repository at this point in the history
This change moves all protos underneath the fabric module.

Having all protos in the fabric module allows module substitution of
any proto that the SDK is using.

Change-Id: I2a3441c10535cca944ec41c96cde05ad44f18f75
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda committed Apr 5, 2019
1 parent ff5642a commit 8d90000
Show file tree
Hide file tree
Showing 32 changed files with 40 additions and 52 deletions.
3 changes: 3 additions & 0 deletions go.mod
Expand Up @@ -4,6 +4,9 @@

module github.com/hyperledger/fabric-sdk-go

// TEMPORARY - so that we can create a commit for the third_party fabric module.
replace github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric => ./third_party/github.com/hyperledger/fabric

require (
github.com/Knetic/govaluate v3.0.0+incompatible
github.com/VividCortex/gohistogram v1.0.0 // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Expand Up @@ -39,6 +39,7 @@ github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1Q
github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc=
github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric v0.0.0-20190404153447-06a75db4978f h1:ebzD7ddt9oE3yP5kBIMr7mKTVLlPt2bWOaHt4c5u6P0=
github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric v0.0.0-20190404153447-06a75db4978f/go.mod h1:yzDA0nf/SiINYnTVcFKQvPM212O1BVriPF2XZLZybbg=
github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric v0.0.0-20190404170344-b1f8907c1f8e h1:UbkCDZPN3983v3lkIhwfBmzfWUmAb2sZVlKDX8KTvC0=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
Expand Down
Expand Up @@ -12,7 +12,7 @@ package discovery

import (
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/pkg/errors"
"google.golang.org/grpc"
)
Expand Down
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/protoext"
gprotoext "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp"
"github.com/pkg/errors"
)
Expand Down
Expand Up @@ -10,7 +10,7 @@ Please review third_party pinning scripts and patches for more details.

package protoext

import "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
import "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"

// QueryType defines the types of service discovery requests
type QueryType uint8
Expand Down
Expand Up @@ -10,7 +10,7 @@ Please review third_party pinning scripts and patches for more details.

package protoext

import "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
import "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"

// ResponseConfigAt returns the ConfigResult at a given index in the Response,
// or an Error if present.
Expand Down
Expand Up @@ -13,7 +13,7 @@ package protoext
import (
"fmt"

"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/gossip"
)

// IsAliveMsg returns whether this GossipMessage is an AliveMessage
Expand Down
Expand Up @@ -15,7 +15,7 @@ import (
"fmt"

"github.com/gogo/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/gossip"
)

// Signer signs a message, and returns (signature, nil)
Expand Down
Expand Up @@ -15,7 +15,7 @@ import (
"fmt"

"github.com/gogo/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/gossip"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/client/common/mocks/mockdiscoveryclient.go
Expand Up @@ -12,11 +12,11 @@ import (

discclient "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client"
gprotoext "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
fabdiscovery "github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery"
discmocks "github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery/mocks"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/gossip"
)

// MockDiscoveryClient implements a mock Discover service
Expand Down
Expand Up @@ -14,7 +14,6 @@ import (
"time"

discclient "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/pkg/client/common/random"
soptions "github.com/hyperledger/fabric-sdk-go/pkg/client/common/selection/options"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/multi"
Expand All @@ -28,6 +27,7 @@ import (
fabdiscovery "github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery"
"github.com/hyperledger/fabric-sdk-go/pkg/util/concurrent/lazycache"
"github.com/hyperledger/fabric-sdk-go/pkg/util/concurrent/lazyref"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/pkg/errors"
grpcCodes "google.golang.org/grpc/codes"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/discovery/discovery.go
Expand Up @@ -11,13 +11,13 @@ import (
"sync"

discclient "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/multi"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
fabcontext "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
corecomm "github.com/hyperledger/fabric-sdk-go/pkg/core/config/comm"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/comm"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/pkg/errors"
"google.golang.org/grpc"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/discovery/discovery_test.go
Expand Up @@ -15,13 +15,13 @@ import (
"time"

discclient "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/multi"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/comm"
discmocks "github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery/mocks"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/mocks"
mspmocks "github.com/hyperledger/fabric-sdk-go/pkg/msp/test/mockmsp"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/fab/discovery/mocks/mockdiscoveryserver.go
Expand Up @@ -11,8 +11,8 @@ import (
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/gossip"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/events/deliverclient/connection/connection.go
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/crypto"
ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protoutil"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
"github.com/hyperledger/fabric-sdk-go/pkg/common/options"
Expand All @@ -22,6 +21,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/pkg/fab/comm"
clientdisp "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/client/dispatcher"
cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"
"github.com/pkg/errors"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/events/deliverclient/deliverclient.go
Expand Up @@ -10,7 +10,6 @@ import (
"math"
"time"

ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
"github.com/hyperledger/fabric-sdk-go/pkg/common/options"
fabcontext "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
Expand All @@ -21,6 +20,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/dispatcher"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/seek"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/events/endpoint"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/events/deliverclient/dispatcher/dispatcher.go
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
package dispatcher

import (
ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
"github.com/hyperledger/fabric-sdk-go/pkg/common/options"
fabcontext "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
Expand All @@ -17,6 +16,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/connection"
esdispatcher "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/dispatcher"
cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/events/deliverclient/dispatcher/events.go
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
package dispatcher

import (
ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
)

// SeekEvent is a SeekInfo request to the deliver server
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/events/deliverclient/mocks/mockconnection.go
Expand Up @@ -7,10 +7,10 @@ SPDX-License-Identifier: Apache-2.0
package mocks

import (
ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
clientmocks "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/client/mocks"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/connection"
cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/events/deliverclient/seek/seek.go
Expand Up @@ -9,7 +9,7 @@ package seek
import (
"math"

ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
)

// Type is the type of Seek request to perform.
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/mocks/mockbroadcastserver.go
Expand Up @@ -13,10 +13,10 @@ import (
"sync"

"github.com/golang/protobuf/proto"
po "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/events/service/mocks"
"github.com/hyperledger/fabric-sdk-go/pkg/util/test"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
po "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/orderer/orderer.go
Expand Up @@ -20,7 +20,6 @@ import (
"google.golang.org/grpc/keepalive"
grpcstatus "google.golang.org/grpc/status"

ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/pkg/client/common/verifier"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/status"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
Expand All @@ -29,6 +28,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/pkg/core/config/comm"
"github.com/hyperledger/fabric-sdk-go/pkg/core/config/endpoint"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
)

var logger = logging.NewLogger("fabsdk/fab")
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/orderer/orderer_test.go
Expand Up @@ -19,12 +19,12 @@ import (
grpccodes "google.golang.org/grpc/codes"

"github.com/golang/mock/gomock"
ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/status"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/test/mockfab"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/mocks"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/resource/block.go
Expand Up @@ -11,13 +11,13 @@ import (
reqContext "context"

"github.com/golang/protobuf/proto"
ab "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/retry"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
contextImpl "github.com/hyperledger/fabric-sdk-go/pkg/context"
ccomm "github.com/hyperledger/fabric-sdk-go/pkg/core/config/comm"
"github.com/hyperledger/fabric-sdk-go/pkg/fab/txn"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer"
"github.com/pkg/errors"
)

Expand Down
28 changes: 6 additions & 22 deletions scripts/third_party_pins/fabric/apply_upstream.sh
Expand Up @@ -63,11 +63,7 @@ declare -a CLIENT_UTILS_IMPORT_SUBSTS=(
's/\"github.com\/hyperledger\/fabric\/common\/flogging\/httpadmin/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/sdkpatch\/logbridge\/httpadmin/g'
's/\"github.com\/hyperledger\/fabric\/common\/flogging/flogging\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/sdkpatch\/logbridge/g'
's/\"github.com\/op\/go-logging/logging\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/sdkpatch\/logbridge/g'
's/\"github.com\/hyperledger\/fabric\/protos\/common/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/common/g'
's/\"github.com\/hyperledger\/fabric\/protos\/peer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/peer/g'
's/\"github.com\/hyperledger\/fabric\/protos\/msp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/msp/g'
's/\"github.com\/hyperledger\/fabric\/protos\/orderer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/orderer/g'
's/\"github.com\/hyperledger\/fabric\/protos\/ledger/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/ledger/g'
's/\"github.com\/hyperledger\/fabric\/protos/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos/g'
's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\//g'
)

Expand All @@ -85,27 +81,15 @@ declare -a EXTERNAL_UTILS_IMPORT_SUBSTS=(
INTERNAL_PATH=$THIRDPARTY_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS="${EXTERNAL_UTILS_IMPORT_SUBSTS[*]}" $SCRIPTS_PATH/apply_fabric_external_utils.sh

# protos
echo "Pinning and patching protos (third party) ..."
echo "Pinning and patching protos (fabric common)..."
declare -a PROTOS_IMPORT_SUBSTS=(
's/\"github.com\/hyperledger\/fabric\/protoutil/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/internal\/protoutil/g'
's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\//g'
)
INTERNAL_PATH=$THIRDPARTY_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS="${PROTOS_IMPORT_SUBSTS[*]}" $SCRIPTS_PATH/apply_fabric_protos.sh

# proto utils
echo "Pinning and patching protos (internal) ..."
declare -a PROTOS_INTERNAL_IMPORT_SUBSTS=(
's/\"github.com\/hyperledger\/fabric\/common\/flogging/factory\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/sdkpatch\/logbridge/g'
's/\"github.com\/hyperledger\/fabric\/protos\/common/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/common/g'
's/\"github.com\/hyperledger\/fabric\/protos\/peer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/peer/g'
's/\"github.com\/hyperledger\/fabric\/protos\/msp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/msp/g'
'/package[[:space:]]orderer/s/\"github.com\/hyperledger\/fabric\/protos\/orderer/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos\/orderer/'
's/\"github.com\/hyperledger\/fabric\/protos\/orderer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/orderer/g'
's/\"github.com\/hyperledger\/fabric\/protos\/ledger/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/ledger/g'
's/\"github.com\/hyperledger\/fabric\/protos/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos/g'
's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\//g'
)
INTERNAL_PATH=$THIRDPARTY_INTERNAL_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS="${PROTOS_INTERNAL_IMPORT_SUBSTS[*]}" $SCRIPTS_PATH/apply_fabric_protos_internal.sh
INTERNAL_PATH=$THIRDPARTY_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS="${PROTOS_IMPORT_SUBSTS[*]}" $SCRIPTS_PATH/apply_fabric_protos_common.sh

echo "Pinning and patching protos (fabric network) ..."
INTERNAL_PATH=$THIRDPARTY_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS="${PROTOS_IMPORT_SUBSTS[*]}" $SCRIPTS_PATH/apply_fabric_protos_network.sh

# Cleanup temporary files from patch application
echo "Removing temporary files ..."
Expand Down
Expand Up @@ -27,9 +27,9 @@ import (
"github.com/stretchr/testify/require"

discclient "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client"
fabdiscovery "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery"
"github.com/hyperledger/fabric-sdk-go/pkg/context"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk"
fabdiscovery "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/discovery"
)

const (
Expand Down

0 comments on commit 8d90000

Please sign in to comment.