Guest User

Untitled

a guest
Jan 23rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. await channel.initialize({ discover: true, asLocalhost: true })
  2.  
  3. Error: No endorsement plan available for {"chaincodes":[{"name":"etri-bcdms-token-chaincode"}]}
  4.  
  5. Failed constructing descriptor for chaincode chaincodes:<name:"etri-bcdms-token-chaincode" > ,: cannot satisfy any principal combination
  6.  
  7. const client = this._useFabricCA
  8. ? await getUserClient(orgID, userID)
  9. : await getOrgAdminClient(orgID)
  10. if (!client) {
  11. throw Error(`failed to get the client for ${orgID}`)
  12. }
  13.  
  14. const channel = client.getChannel(channelID)
  15. if (!channel) {
  16. throw Error(`failed to get the channel for ${channelID}`)
  17. }
  18.  
  19. // Service discovery
  20. await channel.initialize({ discover: true, asLocalhost: true })
  21.  
  22. const chaincodeSetting = getChaincodeSetting(channelID)
  23. if (!chaincodeSetting) {
  24. throw Error(`no chaincode set on the channel ${channelID}`)
  25. }
  26.  
  27. const txID = client.newTransactionID()
  28. const request: ChaincodeInvokeRequest = {
  29. // targets: targetList,
  30. chaincodeId: chaincodeSetting.id,
  31. fcn,
  32. args,
  33. txId: txID
  34. }
  35.  
  36. // Process the endorsement
  37. const results = await channel.sendTransactionProposal(request)
Add Comment
Please, Sign In to add comment