我使用示例Fabcar/Javascript-low-level来调用 org1 中的多对等方( peer1,peer2 和中的 peer3 org2 ):
const peer1 = fabric_client.newPeer('grpc://localhost:7051');
console.log('Created client side object to represent the peer 1');
const peer2 = fabric_client.newPeer('grpc://localhost:8051');
console.log('Created client side object to represent the peer 2');
const peer3 = fabric_client.newPeer('grpc://localhost:9051');
console.log('Created client side object to represent the peer 3');
并创建请求
const proposal_request = {
targets: [peer1, peer2, peer3],
chaincodeId: 'mychaincode',
fcn: 'createAsset',
args: ['Test'],
chainId: 'mychannel',
txId: tx_id
};
然后选择event_hub为peer3
let event_hub = channel.newChannelEventHub(peer3);
但是我有错误:错误:2未知:流已删除到peer2,peer3。对等1 OK P / S:配置我的网络
peer1: host:
-7051:7051
-7053:7053
peer2: host:
-8051:7051
-8053:7053
peer3: host:
-9051:7051
-9053:7053
请帮助我, 谢谢!