简体   繁体   中英

getCallerMetadata() and getCallerCert() not found in Hyperledger fabric v1.0

I was trying to build the asset_management. go chaincode using the Fabric v1.0 codebase , but it fails because getCallerMetadata() and getCallerCert() is not found in stub. Is there a replacement for these functions in v1.0 ?

@cjcroix - you can use GetCreator() function in place of getCallerCert()

I don't think that the caller metadata is relevant anymore with the new messages, but you can use the transient field in the proposal to pass in any extra info needed for authentication/authorization in chaincode and you can access it using the GetTransient() function

We are also eventually thinking about passing the entire proposal request into the chaincode as well in the future. That work was started here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM