Skip to content

Commit 5712ce3

Browse files
author
Srinivasan Muralidharan
committed
FAB-1035 move peer specific proto files to peer folder
https://jira.hyperledger.org/browse/FAB-1035 Just a reorg of the files in keeping with creation of "common" and "orderer" package files with corresponding import changes. A final cleanup of removing unused messages and renaming "2" suffixed protos needs to be done as a final cleanup Change-Id: I81cfa970ca5b4ff668dd70247117bd4e34548ad5 Signed-off-by: Srinivasan Muralidharan <muralisr@us.ibm.com>
1 parent 3508592 commit 5712ce3

File tree

150 files changed

+898
-864
lines changed

Some content is hidden

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

150 files changed

+898
-864
lines changed

bddtests/chaincode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
"github.com/golang/protobuf/proto"
2323
"github.com/hyperledger/fabric/core/util"
24-
pb "github.com/hyperledger/fabric/protos"
24+
pb "github.com/hyperledger/fabric/protos/peer"
2525
putils "github.com/hyperledger/fabric/protos/utils"
2626
)
2727

bddtests/endorser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/DATA-DOG/godog"
2727
"github.com/DATA-DOG/godog/gherkin"
2828
"github.com/hyperledger/fabric/core/util"
29-
pb "github.com/hyperledger/fabric/protos"
29+
pb "github.com/hyperledger/fabric/protos/peer"
3030
"golang.org/x/net/context"
3131
"google.golang.org/grpc"
3232
)

bddtests/syschaincode/noop/chaincode.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ import (
2121

2222
"github.com/golang/protobuf/proto"
2323
"github.com/hyperledger/fabric/core/chaincode/shim"
24-
"github.com/hyperledger/fabric/protos"
24+
25+
pb "github.com/hyperledger/fabric/protos/peer"
2526
)
2627

2728
var logger = shim.NewLogger("noop")
2829

2930
type ledgerHandler interface {
30-
GetTransactionByID(txID string) (*protos.Transaction, error)
31+
GetTransactionByID(txID string) (*pb.Transaction, error)
3132
}
3233

3334
// SystemChaincode is type representing the chaincode
@@ -78,7 +79,7 @@ func (t *SystemChaincode) Query(stub shim.ChaincodeStubInterface) ([]byte, error
7879
if nil != txerr || nil == tx {
7980
return nil, txerr
8081
}
81-
newCCIS := &protos.ChaincodeInvocationSpec{}
82+
newCCIS := &pb.ChaincodeInvocationSpec{}
8283
var merr = proto.Unmarshal(tx.Payload, newCCIS)
8384
if nil != merr {
8485
return nil, merr

bddtests/syschaincode/noop/chaincode_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import (
2323
"github.com/golang/protobuf/proto"
2424
"github.com/hyperledger/fabric/core/chaincode/shim"
2525
"github.com/hyperledger/fabric/core/util"
26-
"github.com/hyperledger/fabric/protos"
26+
27+
pb "github.com/hyperledger/fabric/protos/peer"
2728
)
2829

2930
var something = "c29tZXRoaW5n"
@@ -122,11 +123,11 @@ func TestQueryGetTranExisting(t *testing.T) {
122123
type mockLedger struct {
123124
}
124125

125-
func (ml mockLedger) GetTransactionByID(txID string) (*protos.Transaction, error) {
126+
func (ml mockLedger) GetTransactionByID(txID string) (*pb.Transaction, error) {
126127
if txID == "noSuchTX" {
127128
return nil, fmt.Errorf("Some error")
128129
}
129-
newCCIS := &protos.ChaincodeInvocationSpec{ChaincodeSpec: &protos.ChaincodeSpec{CtorMsg: &protos.ChaincodeInput{Args: util.ToChaincodeArgs("execute", something)}}}
130+
newCCIS := &pb.ChaincodeInvocationSpec{ChaincodeSpec: &pb.ChaincodeSpec{CtorMsg: &pb.ChaincodeInput{Args: util.ToChaincodeArgs("execute", something)}}}
130131
pl, _ := proto.Marshal(newCCIS)
131-
return &protos.Transaction{Payload: pl}, nil
132+
return &pb.Transaction{Payload: pl}, nil
132133
}

bddtests/users.go

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

22-
pb "github.com/hyperledger/fabric/protos"
22+
pb "github.com/hyperledger/fabric/protos/peer"
2323
)
2424

2525
// UserRegistration represents a user in the peer network

bddtests/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package bddtests
1818

1919
import (
20-
pb "github.com/hyperledger/fabric/protos"
20+
pb "github.com/hyperledger/fabric/protos/peer"
2121
)
2222

2323
// KeyedProposalResponse the response for an endorsement for internal usage in maps

core/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
"github.com/golang/protobuf/ptypes/empty"
2828
"github.com/hyperledger/fabric/flogging"
29-
pb "github.com/hyperledger/fabric/protos"
29+
pb "github.com/hyperledger/fabric/protos/peer"
3030
)
3131

3232
var log = logging.MustGetLogger("server")

core/chaincode/chaincode_support.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/hyperledger/fabric/core/crypto"
3737
"github.com/hyperledger/fabric/core/ledger"
3838
"github.com/hyperledger/fabric/flogging"
39-
pb "github.com/hyperledger/fabric/protos"
39+
pb "github.com/hyperledger/fabric/protos/peer"
4040
)
4141

4242
// ChainName is the name of the chain to which this chaincode support belongs to.

core/chaincode/chaincodeexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"fmt"
2323

2424
"github.com/hyperledger/fabric/core/util"
25-
pb "github.com/hyperledger/fabric/protos"
25+
pb "github.com/hyperledger/fabric/protos/peer"
2626
)
2727

2828
//create a Transactions - this has to change to Proposal when we move chaincode to use Proposals

core/chaincode/exectransaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"golang.org/x/net/context"
2525

2626
"github.com/hyperledger/fabric/events/producer"
27-
pb "github.com/hyperledger/fabric/protos"
27+
pb "github.com/hyperledger/fabric/protos/peer"
2828
)
2929

3030
//Execute - execute transaction or a query

0 commit comments

Comments
 (0)