Skip to content

Commit ba8263e

Browse files
committed
[FAB-1893] Remove underscore from test chain ID
https://jira.hyperledger.org/browse/FAB-1893 FAB-1349 [1] will drop support for underscores in chain IDs. We therefore need to update the chain ID we use for testing, from `test_chainid` to `testchainid`. This changeset takes care of this. [1] https://jira.hyperledger.org/browse/FAB-1349 Change-Id: Id893beec7cb38aed31c363be03c86568cb76dce7 Signed-off-by: Kostas Christidis <[email protected]>
1 parent 44afe49 commit ba8263e

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

bddtests/steps/bootstrap_impl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def step_impl(context, chainId):
9191
@given(u'the orderer admins use the genesis block for chain "{chainId}" to configure orderers')
9292
def step_impl(context, chainId):
9393
pass
94-
#raise NotImplementedError(u'STEP: Given the orderer admins use the genesis block for chain "test_chainid" to configure orderers')
94+
#raise NotImplementedError(u'STEP: Given the orderer admins use the genesis block for chain "testchainid" to configure orderers')
9595

9696
@given(u'the ordererBootstrapAdmin generates a GUUID to identify the orderer system chain and refer to it by name as "{ordererSystemChainId}"')
9797
def step_impl(context, ordererSystemChainId):

bddtests/steps/orderer_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from common.common_pb2 import Payload
3737

3838
# The default chain ID when the system is statically bootstrapped for testing
39-
TEST_CHAIN_ID = "test_chainid"
39+
TEST_CHAIN_ID = "testchainid"
4040

4141
def _defaultDataFunction(index):
4242
payload = common_pb2.Payload(

common/util/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func ArrayToChaincodeArgs(args []string) [][]byte {
144144
return bargs
145145
}
146146

147-
const testchainid = "test_chainid"
147+
const testchainid = "testchainid"
148148
const testorgid = "**TEST_ORGID**"
149149

150150
//GetTestChainID returns the CHAINID constant in use by orderer

docs/channel-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ peer node start --peer-defaultchain=false
9292
```
9393

9494
```
95-
"--peer-defaultchain=true" is the default. It allow users continue to work with the default "test_chainid" without having to join a chain.
95+
"--peer-defaultchain=true" is the default. It allow users continue to work with the default "testchainid" without having to join a chain.
9696
97-
"--peer-defaultchain=false" starts the peer with only the channels that were joined by the peer. If the peer never joined a channel it would start up without any channels. In particular, it does not have the default "test_chainid" support.
97+
"--peer-defaultchain=false" starts the peer with only the channels that were joined by the peer. If the peer never joined a channel it would start up without any channels. In particular, it does not have the default "testchainid" support.
9898
9999
To join channels, a peer MUST be started with the "--peer-defaultchain=false" option.
100100
```

examples/ccchecker/ccchecker.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
}
1515
],
1616
"TimeoutToAbortSecs": 60,
17-
"ChainName": "test_chainid"
17+
"ChainName": "testchainid"
1818
}

orderer/common/bootstrap/provisional/provisional.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const (
5050
// networks. It it necessary to set and export this variable so that test
5151
// clients can connect without being rejected for targetting a chain which
5252
// does not exist.
53-
TestChainID = "test_chainid"
53+
TestChainID = "testchainid"
5454

5555
// AcceptAllPolicyKey is the key of the AcceptAllPolicy.
5656
AcceptAllPolicyKey = "AcceptAllPolicy"

peer/node/start.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func startCmd() *cobra.Command {
5757
flags.BoolVarP(&chaincodeDevMode, "peer-chaincodedev", "", false,
5858
"Whether peer in chaincode development mode")
5959
flags.BoolVarP(&peerDefaultChain, "peer-defaultchain", "", true,
60-
"Whether to start peer with chain test_chainid")
60+
"Whether to start peer with chain testchainid")
6161

6262
return nodeStartCmd
6363
}
@@ -184,7 +184,7 @@ func serve(args []string) error {
184184
panic(fmt.Sprintf("Unable to create genesis block for [%s] due to [%s]", chainID, err))
185185
}
186186

187-
//this creates test_chainid and sets up gossip
187+
//this creates testchainid and sets up gossip
188188
if err = peer.CreateChainFromBlock(block); err == nil {
189189
fmt.Printf("create chain [%s]", chainID)
190190
scc.DeploySysCCs(chainID)
@@ -198,7 +198,7 @@ func serve(args []string) error {
198198
}
199199
}
200200

201-
//this brings up all the chains (including test_chainid)
201+
//this brings up all the chains (including testchainid)
202202
peer.Initialize(startDeliveryService)
203203

204204
logger.Infof("Starting peer with ID=%s, network ID=%s, address=%s",

0 commit comments

Comments
 (0)