Reputation: 41
How to get the endorsement from multiple peers by using command line to invoke the transaction? Now the example e2e_cli only shows us get the endorsement from one peer. The command like, CORE_PEER_ADDRESS=peer0:7051 peer chaincode invoke -C myc -n mycc -v v0 -c '{"Args":["invoke","a","b","10"]}'
Thanks.
Upvotes: 0
Views: 588
Reputation: 467
In the past, peer CLI could only collect an endorsement from a single peer when submitting a transaction. A simple hack has been proposed to address this requirement in Hyperledger JIRA in the following issue report. The hack is described as the following command.
peer chaincode invoke -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCerts /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 --tlsRootCerts /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"]}' >&log.txt
Upvotes: 0