我使用此文档在亚马逊管理的区块链中建立了超级账本结构网络。我用这个作为休息服务器。我已在此处将对等名称配置为peer1。它工作正常。后来,我使用此文档又添加了一个成员。现在,成员1和成员2应该认可该交易。
docker exec cli peer chaincode instantiate -o $ORDERER
-C ourchannel -n myjointcc -v v0
-c '{"Args":["init","a","100","b","200"]}'
--cafile /opt/home/managedblockchain-tls-chain.pem --tls
-P "AND ('Member1ID.member','Member2ID.member')"
现在我将这个配置文件编辑为"peers":["peer1", "peer2"]
。但我得到了以下错误,
[2020-09-02 05:54:20.915] [ERROR] invoke-chaincode - Error: Peer with name "peer2" not assigned to this channel
at Channel._getTargets (/var/www/html/network/node_modules/fabric-client/lib/Channel.js:3515:13)
at Channel.sendTransactionProposal (/var/www/html/network/node_modules/fabric-client/lib/Channel.js:2791:26)
at Object.invokeChaincode (/var/www/html/network/app/invoke-transaction.js:41:31)
at <anonymous>
[2020-09-02 05:54:20.915] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: Peer with name "peer2" not assigned to this channel
我应该用什么代替peer2?请帮助我解决此问题。
您可能错过了将对等方连接到通道的步骤:
docker exec cli peer channel join -b /opt/home/ourchannel.block
-o $ORDERER --cafile /opt/home/managedblockchain-tls-chain.pem --tls
org1和org2都需要在各自的Hyperledger Fabric客户端上运行以下命令,以将其对等节点加入通道