Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- await channel.initialize({ discover: true, asLocalhost: true })
- Error: No endorsement plan available for {"chaincodes":[{"name":"etri-bcdms-token-chaincode"}]}
- Failed constructing descriptor for chaincode chaincodes:<name:"etri-bcdms-token-chaincode" > ,: cannot satisfy any principal combination
- const client = this._useFabricCA
- ? await getUserClient(orgID, userID)
- : await getOrgAdminClient(orgID)
- if (!client) {
- throw Error(`failed to get the client for ${orgID}`)
- }
- const channel = client.getChannel(channelID)
- if (!channel) {
- throw Error(`failed to get the channel for ${channelID}`)
- }
- // Service discovery
- await channel.initialize({ discover: true, asLocalhost: true })
- const chaincodeSetting = getChaincodeSetting(channelID)
- if (!chaincodeSetting) {
- throw Error(`no chaincode set on the channel ${channelID}`)
- }
- const txID = client.newTransactionID()
- const request: ChaincodeInvokeRequest = {
- // targets: targetList,
- chaincodeId: chaincodeSetting.id,
- fcn,
- args,
- txId: txID
- }
- // Process the endorsement
- const results = await channel.sendTransactionProposal(request)
Add Comment
Please, Sign In to add comment