为什么byfn只是在两个对等点(超级账本结构)上调用?

问题描述 投票:0回答:1

我在byfn中看到,仅两个对等体用于代码调用,但是我们在网络中有四个对等体。为什么只用两个?

./ byfn.md:+对等链代码调用-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“]}'./byfn.md:2019-11-24 08:01:03.051 UTC [chaincodeCmd] chaincodeInvokeOrQuery-> INFO 001链码调用成功。结果:状态:200./byfn.md:======================在通道'mychannel'上的peer0.org1 peer0.org2上调用事务成功======== ============ =>

我在byfn中看到,仅两个对等体用于代码调用,但是我们在网络中有四个对等体。为什么只用两个? ./byfn.md:+对等链码调用-o orderer.example.com:7050 --tls ...

hyperledger-fabric
1个回答
0
投票

因为org1的peer0和peer1实际上是相同的。他们共享八卦协议,并且以本地副本的形式共享同一分类帐。查询和调用peer0将获得与查询和调用peer1相同的输出。

© www.soinside.com 2019 - 2024. All rights reserved.