dreamer2014520 2017-12-29 15:47 采纳率: 0%
浏览 105
已采纳

从对等方删除ChainCode

I made a mistake my chaincode and installed them on the peers on my network. When I tried to instantiate the chaincode in the channels, I found the error.

  1. Is there a way to debug chaincode before installing it on peers ? It seems to only get flagged when you instantiate it.
  2. Is there a way to delete the chaincode from the peers without having to restart the network?
  • 写回答

2条回答 默认 最新

  • douxia5179 2017-12-30 17:45
    关注
    1. Depends on what you mean by mistake / debug. You should make sure it compiles first. That eliminates all typos, syntax, missing libraries, etc. But there is no way to debug functionality except to install and instantiate.

    2. Technically, no. You can delete all the storage (/var/hyperledger/production/peer, /var/hyperledger/production/orderer, the kafka/zookeeper files, and CouchDB). Not a real big deal, but you do have to restart the network and recreate the channel, join it, install and instantiate the cc, etc. But you can install as a different name. Just change the name in your app connection definition to match. You can also upgrade by changing the version number but keeping the same name.

    I just change the name until I get to a fairly settled spot and then do the deletes and restart all to clean up. A full cleanup (4 peers, 3 orderers, 4 kafka,3 zoopkeeper) takes me maybe 30 minutes. Normally, I keep a CLI open with install ccname1 and instantiate ccname1 in the buffer and can easily increment to ccname2,3,4,5. It only takes a few seconds that way.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程