我可以成功执行多次peer chaincode instantiate
,它应该返回它的存在,但不是。为什么?为什么peer chaincode实例成功执行多次
logs after instantiate command
步骤:
从my github project chaincode-docker-devmode,我复制MSP(对等体和订货人一起使用),genesis.block,helloch.tx,搬运工-撰写-与 - couch.yaml等形成其他地方,应该没问题。当我执行:
docker-compose -f docker-compose-with-couch.yaml up
对等体,订货人,couchdb0,CLI开始,然后执行CLI script.sh
#script.sh content
peer channel create -c helloch -f helloch.tx -o orderer:7050
peer channel join -b helloch.block
然后我使用终端在chaincode-搬运工-DEVMODE电流路径模拟CLI环境由以下:
#cli simulation, $pwd is the chaincode-docker-devmode path
export CORE_VM_ENDPOINT=unix:///var/run/run/docker.sock
export CORE_LOGGING_LEVEL=DEBUG
export CORE_PEER_ID=cli
export CORE_PEER_ADDRESS=127.0.0.1:7051
export CORE_PEER_LOCALMSPID=DEFAULT
export CORE_PEER_MSPCONFIGPATH=$pwd/msp
bash
当我执行peer channel list
这可能表明我加入helloch
频道。然后我执行:
peer chaincode install -n hello -v 1.0 -l java -p chaincode/hsl-hsl-user-guide-examples-v14/mytest
peer chaincode instantiate -o 127.0.0.1:7050 -C helloch -n hello -v 1.0 -l java -c "{\"Args\":[\"init\",\"a\", \"100\", \"b\",\"100\"]}"
但我可以实例很多次,日志不返回错误as same as above instantiate logs,其实它并没有成功实例,为什么呢?
非常感谢你,你是对的!我非常兴奋。 –
欢迎:),我相信这也解决了您的其他问题:https://stackoverflow.com/questions/46035198/why-chaincode-instantiate-success-but-query-failed –
是的,他们是同样的问题。谢谢,我们可以沟通,我可以收到你的电子邮件吗? –