gpt4 book ai didi

hyperledger-fabric - 修改后如何升级链码?

转载 作者:行者123 更新时间:2023-12-02 08:10:43 26 4
gpt4 key购买 nike

我是 super 账本的新手,正在浏览示例 here .我试图玩转链码,但现在卡在我想升级链码的部分

我尝试在 docker peer 节点中执行 peer 链码升级:

peer chaincode upgrade -n tuna-app -p github.com/tuna-app

但最终出现错误
 Error getting (testchainid) orderer endpoint: Error endorsing GetConfigBlock: rpc error: code = Unknown desc = chaincode error (status: 500, message: "GetConfigBlock" request failed authorization check for channel [testchainid]: [Failed to get policy manager for channel [testchainid]])

最佳答案

您需要指定要升级链码的 channel 名称,还需要指定 args 和新版本。此外,您必须指定排序服务端点,以便对等 cli 能够提交升级事务:

peer chaincode upgrade -n tuna-app -v 2.0 \
-c '{"Args":[""]}' \
-p github.com/tuna-app -C mychannel \
-o orderer:7051

您可以找到更多 here .

关于hyperledger-fabric - 修改后如何升级链码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47330576/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com