简体   繁体   English

在Hyperledger架构v1.0中找不到getCallerMetadata()和getCallerCert()

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

I was trying to build the asset_management. 我正在尝试建立asset_management。 go chaincode using the Fabric v1.0 codebase , but it fails because getCallerMetadata() and getCallerCert() is not found in stub. 使用Fabric v1.0代码库执行链代码,但失败,因为在存根中未找到getCallerMetadata()getCallerCert() Is there a replacement for these functions in v1.0 ? v1.0中是否可以替代这些功能?

@cjcroix - you can use GetCreator() function in place of getCallerCert() @cjcroix-您可以使用GetCreator() 函数代替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 我认为调用者元数据与新消息不再相关,但是您可以使用提案中的transient字段以链码形式传递身份验证/授权所需的任何额外信息,并且可以使用GetTransient()访问它功能

We are also eventually thinking about passing the entire proposal request into the chaincode as well in the future. 我们最终还将考虑将来将整个提案请求传递到链码中。 That work was started here 这项工作从这里开始

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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