Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

What is the peer name If we add two member #109

Open
guru260 opened this issue Sep 2, 2020 · 1 comment
Open

What is the peer name If we add two member #109

guru260 opened this issue Sep 2, 2020 · 1 comment

Comments

@guru260
Copy link

guru260 commented Sep 2, 2020

I set up hyperledger fabric network using single member in amazon manged blockchain. I have used this rest api. It worked properly. Then I added one more member follwoing this document. I have added endorsement policy as below,

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 need to add peer of new member in this config file I have added like "peers":["peer1", "peer2"]. But I am getting the following error in REST Server.

[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

Help me what peer name should I use here for peer of newly added member.

@MCLDG
Copy link
Contributor

MCLDG commented Sep 18, 2020

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants