[英]What is the peer name If we add two members | amazon managed blockchain | REST Server
I set up hyperledger fabric network in amazon managed blockchain using this document .我使用本文档在亚马逊管理的区块链中设置了超级账本结构网络。 I have used this as rest server.
我已将其用作休息服务器。 I have configured peer name as peer1 here .
我在这里配置了 peer name 为 peer1 。 It was worked properly.
它工作正常。 Later I added one more member using this document .
后来我使用这个文档又添加了一个成员。 Now member 1 and member 2 should endorse the transaction.
现在成员 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')"
Now I edited this config file as "peers":["peer1", "peer2"]
.现在我将此配置文件编辑为
"peers":["peer1", "peer2"]
。 But I am getting the following error,但我收到以下错误,
[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
What should I used instead of peer2?我应该用什么来代替 peer2? Help me to fix this issue.
帮我解决这个问题。
you may have missed the step of joinning the peer to the channel:您可能错过了将peer加入频道的步骤:
docker exec cli peer channel join -b /opt/home/ourchannel.block \
-o $ORDERER --cafile /opt/home/managedblockchain-tls-chain.pem --tls
Both org1 and org2 need to run the following command on their respective Hyperledger Fabric clients to join their peer nodes to the channel org1 和 org2 都需要在各自的 Hyperledger Fabric 客户端上运行以下命令以将其对等节点加入通道
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.