API to get local MSPID in chaincode? #fabric #fabric-questions #fabric-chaincode


Yueming Xu
 

when my chaincode wants to write to the implicit private data collection, I need to get the local MSPID where the chaincode is deployed.  What is a good way to get it? check the ENV of CORE_PEER_LOCALMSPID?  Or should I use the CID's MSPID, assuming the client must match the peer's MSPID for private data?  or send the designated MSPID as part of the request parameter?

Join fabric@lists.hyperledger.org to automatically receive all group messages.