1 Star 0 Fork 0

妥協/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
standard_networks.go 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
Matthew Sykes 提交于 2018-06-12 16:38 . [FAB-10643] implement a new world
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package nwo
func BasicSolo() *Config {
return &Config{
Organizations: []*Organization{{
Name: "OrdererOrg",
MSPID: "OrdererMSP",
Domain: "example.com",
EnableNodeOUs: false,
Users: 0,
CA: &CA{Hostname: "ca"},
}, {
Name: "Org1",
MSPID: "Org1MSP",
Domain: "org1.example.com",
EnableNodeOUs: true,
Users: 2,
CA: &CA{Hostname: "ca"},
}, {
Name: "Org2",
MSPID: "Org2MSP",
Domain: "org2.example.com",
EnableNodeOUs: true,
Users: 2,
CA: &CA{Hostname: "ca"},
}},
Consortiums: []*Consortium{{
Name: "SampleConsortium",
Organizations: []string{
"Org1",
"Org2",
},
}},
Consensus: &Consensus{
Type: "solo",
},
SystemChannel: &SystemChannel{
Name: "systemchannel",
Profile: "TwoOrgsOrdererGenesis",
},
Orderers: []*Orderer{
{Name: "orderer", Organization: "OrdererOrg"},
},
Channels: []*Channel{
{Name: "testchannel", Profile: "TwoOrgsChannel"},
},
Peers: []*Peer{{
Name: "peer0",
Organization: "Org1",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: true},
},
}, {
Name: "peer1",
Organization: "Org1",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: false},
},
}, {
Name: "peer0",
Organization: "Org2",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: true},
},
}, {
Name: "peer1",
Organization: "Org2",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: false},
},
}},
Profiles: []*Profile{{
Name: "TwoOrgsOrdererGenesis",
Orderers: []string{"orderer"},
}, {
Name: "TwoOrgsChannel",
Consortium: "SampleConsortium",
Organizations: []string{"Org1", "Org2"},
}},
}
}
func BasicKafka() *Config {
config := BasicSolo()
config.Consensus.Type = "kafka"
config.Consensus.ZooKeepers = 1
config.Consensus.Brokers = 1
return config
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liurenhao/fabric.git
git@gitee.com:liurenhao/fabric.git
liurenhao
fabric
fabric
v1.2.1

搜索帮助

0d507c66 1850385 C8b1a773 1850385