Skip to content

Commit dca94df

Browse files
committed
Fix error in channel setup instruction
Rework some text and invoke transaction sample Change-Id: Ie6927316494cace186fdac4f14e7443e1779c692 Signed-off-by: Binh Q. Nguyen <[email protected]>
1 parent ad02d0c commit dca94df

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

docs/channel-setup.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ The commands are work in progress. In particular, there will be more configurati
1414
https://jira.hyperledger.org/browse/FAB-1639
1515
https://jira.hyperledger.org/browse/FAB-1580
1616
```
17+
Assuming the orderer and peer have been built, and the executables are available in build/bin directory. Switch to build/bin directory.
1718

1819
## Create a channel
1920
### Using CLI in Vagrant environment
2021
_Vagrant window 1 - start orderer_
2122

2223
```
23-
cd orderer
2424
ORDERER_GENERAL_LOGLEVEL=debug ./orderer
2525
```
2626
_Vagrant window 2 - ask orderer to create a chain_
2727

2828
```
29-
cd peer
30-
peer channel create -c mychannel
29+
peer channel create -c myc1
3130
```
3231

33-
On successful creation, a genesis block mychannel.block is saved in the same directory.
32+
On successful creation, a genesis block myc1.block is saved in build/bin directory.
3433

3534
### Using docker environment
3635
TODO
@@ -40,23 +39,21 @@ TODO
4039
_Vagrant window 3 - start the peer in a "chainless" mode_
4140

4241
```
43-
#NOTE - clear the environment with rm -rf /var/hyperledger/* after updating fabric to get channel support.
42+
#NOTE - clear the environment with rm -rf /var/hyperledger/* after updating fabric to get channel support.
4443
45-
cd peer
4644
peer node start --peer-defaultchain=false
4745
```
4846

4947
```
50-
"--peer-defaultchain=true" is the default. It allow users continue to work with the default **TEST_CHAINID** without having to join a chain.
48+
"--peer-defaultchain=true" is the default. It allow users continue to work with the default **TEST_CHAINID** without having to join a chain.
5149
52-
"--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.
50+
"--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.
5351
54-
To join channels, a peer MUST be started with the "--peer-defaultchain=false" option.
52+
To join channels, a peer MUST be started with the "--peer-defaultchain=false" option.
5553
```
56-
_Vagrant window 4 - peer to join a channel_
54+
_Vagrant window 2 - peer to join a channel_
5755

5856
```
59-
cd peer
6057
peer channel join -b myc1.block
6158
```
6259

@@ -71,7 +68,6 @@ At this point we can issue transactions.
7168
_Vagrant window 2 - deploy a chaincode to myc1_
7269

7370
```
74-
cd peer
7571
peer chaincode deploy -C myc1 -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args":["init","a","100","b","200"]}'
7672
```
7773

@@ -82,18 +78,17 @@ Wait for the deploy to get committed (e.g., by default the `solo orderer` can ta
8278
_Vagrant window 2 - invoke chaincode_
8379

8480
```
85-
cd peer
86-
peer chaincode query -C myc1 -n mycc -c '{"Args":["invoke","a","b","10"]}'
81+
peer chaincode invoke -C myc1 -n mycc -c '{"Args":["invoke","a","b","10"]}'
8782
```
8883

8984
Wait for upto 10 seconds for the invoke to get committed.
9085

9186
_Vagrant window 2 - query chaincode_
9287

9388
```
94-
cd peer
95-
peer chaincode query -C myc1 -n mycc -c '{"Args":["query","a"]}'
89+
peer chaincode query -C myc1 -n mycc -c '{"Args":["query","a"]}'
9690
```
9791
### Using docker environment
9892
TODO
9993

94+
To reset, clear out the `fileSystemPath` directory (defined in core.yaml) and myc1.block.

0 commit comments

Comments
 (0)