【发布时间】:2018-08-27 05:16:41
【问题描述】:
我正在尝试运行链接中的余额转移示例:https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer#sample-rest-apis-request
我想问为什么我在授权的情况下仍然可以调用chaincode并成功运行:Bearer是org1但调用是在Org2上完成的([“peer1.org2.example.com”)?为什么这不会导致授权错误?
另外,为什么我可以在Org2上查询chaincode use Org1证书。是否存在与 CA 相关的设置问题?
echo "POST invoke chaincode on peers of Org1"
echo
TRX_ID=$(curl -s -X POST \
http://localhost:4000/channels/mychannel/chaincodes/mycc \
-H "authorization: Bearer $ORG1_TOKEN" \
-H "content-type: application/json" \
-d '{
"peers": ["peer1.org2.example.com"],
"fcn":"move",
"args":["a","b","10"]
}')
echo "Transacton ID is $TRX_ID"
echo
echo
非常感谢。
【问题讨论】:
标签: hyperledger-fabric hyperledger ca