diff --git a/samples/chaincode/secret-keeper-go/Makefile b/samples/chaincode/secret-keeper-go/Makefile index 1aaba8224..ab6d5f6b1 100644 --- a/samples/chaincode/secret-keeper-go/Makefile +++ b/samples/chaincode/secret-keeper-go/Makefile @@ -4,18 +4,13 @@ # SPDX-License-Identifier: Apache-2.0 TOP = ../../.. -include $(TOP)/ecc_go/build.mk CC_NAME ?= fpc-secret-keeper-go # Define paths for cmd subdirectories -NAIVE_PATH = cmd/naive/main.go +DEFAULT= cmd/naive/main.go SKVS_PATH = cmd/skvs/main.go -# Target to build naive version -naive: - $(MAKE) build MAIN_GO_PATH=$(NAIVE_PATH) +MAIN_GO_PATH ?=$(DEFAULT) -# Target to build skvs version -skvs: - $(MAKE) build MAIN_GO_PATH=$(SKVS_PATH) +include $(TOP)/ecc_go/build.mk diff --git a/samples/chaincode/secret-keeper-go/main.go b/samples/chaincode/secret-keeper-go/main.go deleted file mode 100644 index 1dc1af38a..000000000 --- a/samples/chaincode/secret-keeper-go/main.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright IBM Corp. All Rights Reserved. -Copyright 2020 Intel Corporation - -SPDX-License-Identifier: Apache-2.0 -*/ - -package main - -import ( - "os" - - "github.com/hyperledger/fabric-chaincode-go/shim" - "github.com/hyperledger/fabric-contract-api-go/contractapi" - fpc "github.com/hyperledger/fabric-private-chaincode/ecc_go/chaincode" - "github.com/hyperledger/fabric-private-chaincode/samples/chaincode/secret-keeper-go/chaincode" -) - -func main() { - - ccid := os.Getenv("CHAINCODE_PKG_ID") - addr := os.Getenv("CHAINCODE_SERVER_ADDRESS") - - // create chaincode - secretChaincode, _ := contractapi.NewChaincode(&chaincode.SecretKeeper{}) - // chaincode := fpc.NewPrivateChaincode(secretChaincode) - skvsChaincode := fpc.NewSkvsChaincode(secretChaincode) - - // start chaincode as a service - server := &shim.ChaincodeServer{ - CCID: ccid, - Address: addr, - CC: skvsChaincode, - TLSProps: shim.TLSProperties{ - Disabled: true, // just for testing good enough - }, - } - - if err := server.Start(); err != nil { - panic(err) - } -}