如何在通道中一次实例化所有链码?

How to instantiate all chaincodes at once in the channel?

我对链码实例化有疑问。 我认为一个通道中的所有相同链代码将通过此文档的一个请求一次性全部实例化。

http://hyperledger-fabric.readthedocs.io/en/release-1.1/install_instantiate.html

Note: The initial instantiation applies to all peers in the channel, and is affected upon any peer that has the chaincode installed.

但是在我使用 v1.0.6 fabric 的流浪环境中,我从 Node SDK 发出的 Instantiate 请求总是只实例化一个链代码(在背书上安装的三个 cc 中)。 那么似乎如果收到任何其他提议请求,该背书者就会开始实例化其他链码。所以如果我的背书政策需要背书,第一次调用请求失败...

最初,链码只会在您向其发送实际实例化提案的对等节点上启动。然后它将在第一次调用请求时在通道中的其他对等点上启动。如果您想在实例化时启动链代码,则需要将实例化请求发送给所有背书节点。 channel.sendInstantiateProposal takes a ChaincodeInstantiateUpgradeRequest 允许您在其目标 属性.

中指定一组对等点