node.js - Hyperledger Fabric 教程“错误:未知标志:--peerAddresses”
问题描述
我正在遵循http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html上的教程
我一直在复制和粘贴,并选择了提供选择的 Node.js 变体。
peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'
当我看到上面的代码时,它给了我错误“错误:未知标志:--peerAddresses”
请参阅下面的终端历史记录:
https://paste.ubuntu.com/p/xC5NNQVJyW/
如果您需要更多信息,请务必告知
解决方案
这是一个半答案,但我认为您应该遵循http://hyperledger-fabric.readthedocs.io/en/release-1.1/build_network.html的教程(注意:release-1.1不是最新的)。唯一的区别是,当您实例化时的背书策略是-P "OR ('Org1MSP.peer','Org2MSP.peer')"
而不是-P "AND ('Org1MSP.peer','Org2MSP.peer')"
当您调用链代码时,您只对一个对等方(默认为 org1 的 peer0)背书。
CLI 能够同时获得多个同行的认可是一项新功能(参考:https ://github.com/hyperledger/fabric/commit/368b1511e23d55355d572fd267223bb1bd4de890?short_path=6a6833d#diff- 6a6833de704771c6c6879904e353c025 我认为最新的 docker image)从这篇文章(1.1.0)开始,对于 hyperledger/fabric-tools 并没有反映这种变化。
推荐阅读
- spring - 在登录Spring Boot之前解码密码
- javascript - Quasar + Vue + SSR - 如何隐藏敏感数据,如 API 密钥
- regex - Oracle 11g 中 CLOB 上的 REGEXP_REPLACE 失败并出现 - 没有更多数据可以从套接字读取
- sharepoint - 如何在 Sharepoint 中获取术语集的所有子术语?
- python - 如何在 sympy (jupyter notebook) 中将乳胶字符串显示为乳胶输出?
- r - ggplot:3D矩阵:在一个图中绘制多条线并在同一页面上绘制多个图
- wso2 - 有没有办法不在 wso2 APIM 中指定版本
- ios - 面临 Xcode 无法成功运行代码部分并在 AWS 站点上激活以禁用的问题
- mongodb - 如何在猫鼬中使用聚合和查找进行过滤?
- python - 从 AWS S3 读取数据