Skip to content

Commit bf29be3

Browse files
committed
More debugging instructions for Fabric CLI data transfer workflow
Signed-off-by: VRamakrishna <[email protected]>
1 parent 9d3a8f4 commit bf29be3

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/data-transfer.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,6 @@ jobs:
465465
466466
# FABRIC2 - FABRIC1
467467
cp chaincode.json.template chaincode.json
468-
echo "chaincode.json contents (FAB2 - FAB1):"
469-
cat chaincode.json
470468
./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP localhost:9080/network1/mychannel:simplestate:Read:a &> tmp.out
471469
tail -n 1 tmp.out | grep "Args: a, Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS"
472470
cat tmp.out
@@ -477,8 +475,6 @@ jobs:
477475
478476
# FABRIC1 - FABRIC2
479477
sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"Arcturus\"/g" chaincode.json
480-
echo "chaincode.json contents (FAB1 - FAB2):"
481-
cat chaincode.json
482478
./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP localhost:9083/network2/mychannel:simplestate:Read:Arcturus &> tmp.out
483479
tail -n 1 tmp.out | grep "Args: Arcturus, 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS"
484480
cat tmp.out
@@ -490,8 +486,6 @@ jobs:
490486
# FABRIC1 - CORDA
491487
cp chaincode.json.template chaincode.json
492488
sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"H\"/g" chaincode.json
493-
echo "chaincode.json contents (FAB1 - COR):"
494-
cat chaincode.json
495489
./bin/fabric-cli interop --local-network=network1 --sign=true --requesting-org=Org1MSP localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:H --debug=true &> tmp.out
496490
tail -n 1 tmp.out | grep "Args: H, \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS"
497491
cat tmp.out
@@ -503,8 +497,6 @@ jobs:
503497
# FABRIC2 - CORDA
504498
cp chaincode.json.template chaincode.json
505499
sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"C\"/g" chaincode.json
506-
echo "chaincode.json contents (FAB2 - COR):"
507-
cat chaincode.json
508500
./bin/fabric-cli interop --local-network=network2 --sign=true --requesting-org=Org1MSP localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:C --debug=true --debug=true &> tmp.out
509501
tail -n 1 tmp.out | grep "Args: C, \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS"
510502
cat tmp.out

samples/fabric/fabric-cli/src/helpers/helpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ const getChaincodeConfig = (
530530
? path.join(process.env.CHAINCODE_PATH)
531531
: path.join(__dirname, '../../chaincode.json')
532532
try {
533+
console.log('getChaincodeConfig: path:', ccPath)
533534
const ccJSON = JSON.parse(fs.readFileSync(ccPath).toString())
535+
console.log('getChaincodeConfig: JSON:', ccJSON)
534536
if (!ccJSON[chaincodeId]) {
535537
logger.error(
536538
`Chaincode: ${chaincodeId} does not exist in the chaincode.json file`

0 commit comments

Comments
 (0)