Peer
常用命令:#peer chaincode --help
#peer channel list --help
--logging-level
#:debug,info,notice,warning,error,critical --version12345
peer命令包含五个不同的自命令:
peer chaincode [option] [flags]
peer chaincode install [flags]
将指定的链代码打包到部署规范中,并将其保存到peer路径中。参数: -c:JSON字串的链代码构造函数消息(默认”{}”) -h:帮助 -l:编写chaincode的语言,默认”golang” -n:chaincode名 -p:chaincode路径 -v:chaincode版本 -o:orderer节点
peer chaincode instantiate [flags]
-C:channel ID string -c:JSON字串的链代码构造函数消息(默认”{}”) -h:帮助 -l:编写chaincode的语言,默认”golang” -n:chaincode名 -E: The name of the endorsement system chaincode to be used for this chaincode -P:与此代码相关的认可政策 -o:orderer节点 实例export ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C mychannel -n mycc -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"12
peer chaincode invoke
调用指定的链代码