Skip to content

Commit

Permalink
[FAB-9115] Standardize on "chaincode", not "chain code"
Browse files Browse the repository at this point in the history
Might as well change the small number of outliers to use the standard
spelling for this term.

Change-Id: Ia11cfea34e276775e3d235f04ade0afa5c21e7aa
Signed-off-by: Robert P. J. Day <[email protected]>
  • Loading branch information
rpjday committed Mar 26, 2018
1 parent 2e0c661 commit a927ad9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions core/common/ccprovider/ccinfocache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ func TestCCInfoFSPeerInstance(t *testing.T) {
err = PutChaincodeIntoFS(ds)
assert.NoError(t, err)

// Get all installed chaincodes, it should not return 0 chain codes
// Get all installed chaincodes, it should not return 0 chaincodes
resp, err := GetInstalledChaincodes()
assert.NoError(t, err)
assert.NotNil(t, resp)
assert.NotZero(t, len(resp.Chaincodes), "GetInstalledChaincodes should not have returned 0 chain codes")
assert.NotZero(t, len(resp.Chaincodes), "GetInstalledChaincodes should not have returned 0 chaincodes")

//get chaincode data
_, err = GetChaincodeData(ccname, ccver)
Expand All @@ -200,14 +200,14 @@ func TestGetInstalledChaincodesErrorPaths(t *testing.T) {
assert.NoError(t, err)
defer os.RemoveAll(dir)

// Set the above created directory as the chain code install path
// Set the above created directory as the chaincode install path
SetChaincodesPath(dir)
err = ioutil.WriteFile(filepath.Join(dir, "idontexist.1.0"), []byte("test"), 0777)
assert.NoError(t, err)
resp, err := GetInstalledChaincodes()
assert.NoError(t, err)
assert.Equal(t, 0, len(resp.Chaincodes),
"Expected 0 chain codes but GetInstalledChaincodes returned %s chain codes", len(resp.Chaincodes))
"Expected 0 chaincodes but GetInstalledChaincodes returned %s chaincodes", len(resp.Chaincodes))
}

func TestNewCCContext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/scc/importsysccs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
package scc

import (
//import system chain codes here
//import system chaincodes here
"github.com/hyperledger/fabric/core/scc/cscc"
"github.com/hyperledger/fabric/core/scc/escc"
"github.com/hyperledger/fabric/core/scc/lscc"
Expand Down
4 changes: 2 additions & 2 deletions test/chaincodes/AuctionApp/art.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0
///////////////////////////////////////////////////////////////////////
// Author : IT People - Mohan Venkataraman - Auction API for v1.0
// Purpose: Explore the Hyperledger/fabric and understand
// how to write an chain code, application/chain code boundaries
// how to write a chaincode, application/chaincode boundaries
// The code is not the best as it has just hammered out in a day or two
// Feedback and updates are appreciated
///////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -638,7 +638,7 @@ func GetTransaction(stub shim.ChaincodeStubInterface, function string, args []st
// registered
// There are different types of users - Traders (TRD), Auction Houses (AH)
// Shippers (SHP), Insurance Companies (INS), Banks (BNK)
// While this version of the chain code does not enforce strict validation
// While this version of the chaincode does not enforce strict validation
// the business process recommends validating each persona for the service
// they provide or their participation on the auction blockchain, future enhancements will do that
// ./peer chaincode invoke -l golang -n mycc -c '{"Function": "PostUser", "Args":["100", "USER", "Ashley Hart", "TRD", "Morrisville Parkway, #216, Morrisville, NC 27560", "9198063535", "[email protected]", "SUNTRUST", "00017102345", "0234678"]}'
Expand Down
2 changes: 1 addition & 1 deletion test/chaincodes/AuctionApp/image_proc_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
///////////////////////////////////////////////////////////////////////
// Author : IT People - Mohan Venkataraman - image API
// Purpose: Explore the Hyperledger/fabric and understand
// how to write an chain code, application/chain code boundaries
// how to write a chaincode, application/chaincode boundaries
// The code is not the best as it has just hammered out in a day or two
// Feedback and updates are appreciated
///////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions test/chaincodes/AuctionApp/table_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
///////////////////////////////////////////////////////////////////////
// Author : IT People - Mohan Venkataraman - table API for v1.0
// Purpose: Explore the Hyperledger/fabric and understand
// how to write an chain code, application/chain code boundaries
// how to write a chaincode, application/chaincode boundaries
// The code is not the best as it has just hammered out in a day or two
// Feedback and updates are appreciated
///////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -52,7 +52,7 @@ var Objects = []string{"PARTY", "CASHTXN", "User", "UserCat", "Item", "ItemCat",
// This information is used to dynamically Create, Update
// Replace , and Query the Ledger
// In this model all attributes in a table are strings
// The chain code does both validation
// The chaincode does both validation
// A dummy key like 2016 in some cases is used for a query to get all rows
//
// "User": 1, Key: UserID
Expand Down

0 comments on commit a927ad9

Please sign in to comment.