如何将我的链码从本地转换为超级账本结构中的对等体?

how can I transform my chaincode from local to peer in hyperledger fabric?

如果我在本地编写一段 Hyperledger Fabric 链代码,我如何将我的链代码从本地转换为结构节点?

假设当你说 "how can I transform my chaincode from local to peer" 时,你的意思是你想在对等节点上安装和实例化链代码。 您可以按照提供的步骤进行操作 here。 如果您正在按照 here, I'd suggest you create the artifacts manually and follow the steps from here 提供的教程进行操作。 具体来说,使用 cli,您可以使用以下命令从 cli 容器将链代码安装到对等节点中:

peer chaincode install -n mycc -v 1.0 -p path/to/your/chaincode/

-p 选项的参数指定链代码的路径,该路径必须位于用户 GOPATH

的源代码树中