首页 > 解决方案 > 为什么调用查询不执行有效事务?

问题描述

我已经byfn这里设置了。我正在经历的是通过这个命令调用。

peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example。 com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}

它给了我一个我发现的错误docker logs {peer0_container_id}。我也设置CORE_PEER_ADDRESSAUTODETECT=true

2020-01-06 08:08:39.972 UTC [vscc] 验证 -> ERRO 0ad VSCC 错误:stateBasedValidator.Validate 失败,tx 9:0 中链码 mycc 背书策略的错误验证失败:签名集不满足策略

2020-01-06 08:08:39.973 UTC [committer.txvalidator] validateTx -> ERRO 0ae VSCCValidateTx for transaction txId = ea10c982be12ab3762b4199a349c1409fb22bde5230667be7​​8b2394ccdb05d37 returned error: validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy

但是对于这个命令它工作正常我的意思是交易是有效的。

对等链代码调用 -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example。 com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric /peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/ github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a ","b","10"]}'

--peerAddresses除了传递参数之外,还有什么可以配置来调用第一个我的意思吗?

我还从这里添加了第三个组织。在这里调用命令也有效,我的意思是有效交易。

对等链代码调用 -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example。 com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}'

那么,为什么不同的调用不适用于byfn

请注意byfn我已删除所有图像并从一开始就完成了。所以这里实际上没有冲突。

标签: hyperledger-fabricblockchainhyperledger

解决方案


推荐阅读