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

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

我试图使用 Fabric v1.0 代码库构建 asset_management.go 链码,但它失败了,因为在存根中找不到 getCallerMetadata()getCallerCert()。 v1.0 中是否有这些功能的替代品?

@cjcroix - 您可以使用 GetCreator() function 代替 getCallerCert()

我认为调用者元数据与新消息不再相关,但您可以使用提议中的瞬态字段来传递链代码中 authentication/authorization 所需的任何额外信息,并且您可以使用 GetTransient() function

访问它

我们最终也在考虑将来也将整个提案请求传递到链代码中。这项工作已开始 here