Commit 5712ce3a authored by Srinivasan Muralidharan's avatar Srinivasan Muralidharan
Browse files

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: default avatarSrinivasan Muralidharan <muralisr@us.ibm.com>
parent 35085923
......@@ -21,7 +21,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
putils "github.com/hyperledger/fabric/protos/utils"
)
......
......@@ -26,7 +26,7 @@ import (
"github.com/DATA-DOG/godog"
"github.com/DATA-DOG/godog/gherkin"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
......
......@@ -21,13 +21,14 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/core/chaincode/shim"
"github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
var logger = shim.NewLogger("noop")
type ledgerHandler interface {
GetTransactionByID(txID string) (*protos.Transaction, error)
GetTransactionByID(txID string) (*pb.Transaction, error)
}
// SystemChaincode is type representing the chaincode
......@@ -78,7 +79,7 @@ func (t *SystemChaincode) Query(stub shim.ChaincodeStubInterface) ([]byte, error
if nil != txerr || nil == tx {
return nil, txerr
}
newCCIS := &protos.ChaincodeInvocationSpec{}
newCCIS := &pb.ChaincodeInvocationSpec{}
var merr = proto.Unmarshal(tx.Payload, newCCIS)
if nil != merr {
return nil, merr
......
......@@ -23,7 +23,8 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/core/chaincode/shim"
"github.com/hyperledger/fabric/core/util"
"github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
var something = "c29tZXRoaW5n"
......@@ -122,11 +123,11 @@ func TestQueryGetTranExisting(t *testing.T) {
type mockLedger struct {
}
func (ml mockLedger) GetTransactionByID(txID string) (*protos.Transaction, error) {
func (ml mockLedger) GetTransactionByID(txID string) (*pb.Transaction, error) {
if txID == "noSuchTX" {
return nil, fmt.Errorf("Some error")
}
newCCIS := &protos.ChaincodeInvocationSpec{ChaincodeSpec: &protos.ChaincodeSpec{CtorMsg: &protos.ChaincodeInput{Args: util.ToChaincodeArgs("execute", something)}}}
newCCIS := &pb.ChaincodeInvocationSpec{ChaincodeSpec: &pb.ChaincodeSpec{CtorMsg: &pb.ChaincodeInput{Args: util.ToChaincodeArgs("execute", something)}}}
pl, _ := proto.Marshal(newCCIS)
return &protos.Transaction{Payload: pl}, nil
return &pb.Transaction{Payload: pl}, nil
}
......@@ -19,7 +19,7 @@ package bddtests
import (
"fmt"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
// UserRegistration represents a user in the peer network
......
......@@ -17,7 +17,7 @@ limitations under the License.
package bddtests
import (
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
// KeyedProposalResponse the response for an endorsement for internal usage in maps
......
......@@ -26,7 +26,7 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"github.com/hyperledger/fabric/flogging"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
var log = logging.MustGetLogger("server")
......
......@@ -36,7 +36,7 @@ import (
"github.com/hyperledger/fabric/core/crypto"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/flogging"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
// ChainName is the name of the chain to which this chaincode support belongs to.
......
......@@ -22,7 +22,7 @@ import (
"fmt"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
//create a Transactions - this has to change to Proposal when we move chaincode to use Proposals
......
......@@ -24,7 +24,7 @@ import (
"golang.org/x/net/context"
"github.com/hyperledger/fabric/events/producer"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
//Execute - execute transaction or a query
......
......@@ -35,7 +35,7 @@ import (
"github.com/hyperledger/fabric/core/ledger/kvledger"
"github.com/hyperledger/fabric/core/peer"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
putils "github.com/hyperledger/fabric/protos/utils"
"github.com/golang/protobuf/proto"
......
......@@ -27,7 +27,7 @@ import (
"github.com/hyperledger/fabric/core/crypto"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/looplab/fsm"
"github.com/op/go-logging"
"golang.org/x/net/context"
......
......@@ -24,7 +24,7 @@ import (
"github.com/hyperledger/fabric/core/chaincode/shim"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/core/ledger/kvledger"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/op/go-logging"
"golang.org/x/net/context"
)
......
......@@ -22,7 +22,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/core/chaincode/shim"
"github.com/hyperledger/fabric/core/container"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
"google.golang.org/grpc"
)
......
......@@ -23,7 +23,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
//generateHashcode gets hashcode of the code under path. If path is a HTTP(s) url
......
......@@ -27,7 +27,7 @@ import (
"time"
cutil "github.com/hyperledger/fabric/core/container/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
func download(path string) (string, error) {
......
......@@ -17,7 +17,7 @@ limitations under the License.
package car
import (
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
// Platform for the CAR type
......
......@@ -23,7 +23,7 @@ import (
"github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/core/container"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
func TestMain(m *testing.M) {
......
......@@ -35,7 +35,7 @@ import (
cutil "github.com/hyperledger/fabric/core/container/util"
"github.com/hyperledger/fabric/core/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
var logger = logging.MustGetLogger("golang/hash")
......
......@@ -25,7 +25,7 @@ import (
"github.com/spf13/viper"
cutil "github.com/hyperledger/fabric/core/container/util"
pb "github.com/hyperledger/fabric/protos"
pb "github.com/hyperledger/fabric/protos/peer"
)
//tw is expected to have the chaincode in it from GenerateHashcode. This method
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment