代码拉取完成,页面将自动刷新
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package nwo
const ConfigTxTemplate = `---
{{ with $w := . -}}
Organizations:{{ range .PeerOrgs }}
- &{{ .MSPID }}
Name: {{ .Name }}
ID: {{ .MSPID }}
MSPDir: {{ $w.PeerOrgMSPDir . }}
Policies:
Readers:
Type: Signature
Rule: OR('{{.MSPID}}.admin', '{{.MSPID}}.peer', '{{.MSPID}}.client')
Writers:
Type: Signature
Rule: OR('{{.MSPID}}.admin', '{{.MSPID}}.client')
Admins:
Type: Signature
Rule: OR('{{.MSPID}}.admin')
AnchorPeers:{{ range $w.AnchorsInOrg .Name }}
- Host: 127.0.0.1
Port: {{ $w.PeerPort . "Listen" }}
{{- end }}
{{- end }}
{{- range .OrdererOrgs }}
- &{{ .MSPID }}
Name: {{ .Name }}
ID: {{ .MSPID }}
MSPDir: {{ $w.OrdererOrgMSPDir . }}
Policies:
Readers:
Type: Signature
Rule: OR('{{.MSPID}}.member')
Writers:
Type: Signature
Rule: OR('{{.MSPID}}.member')
Admins:
Type: Signature
Rule: OR('{{.MSPID}}.admin')
{{ end }}
Channel: &ChannelDefaults
Capabilities:
V1_1: true
Policies:
Readers:
Type: ImplicitMeta
Rule: ANY Readers
Writers:
Type: ImplicitMeta
Rule: ANY Writers
Admins:
Type: ImplicitMeta
Rule: MAJORITY Admins
Profiles:{{ range .Profiles }}
{{ .Name }}:
{{- if .Orderers }}
<<: *ChannelDefaults
Consortiums:{{ range $w.Consortiums }}
{{ .Name }}:
Organizations:{{ range .Organizations }}
- *{{ ($w.Organization .).MSPID }}
{{- end }}
{{- end }}
Orderer:
OrdererType: {{ $w.Consensus.Type }}
Addresses:{{ range .Orderers }}{{ with $w.Orderer . }}
- 127.0.0.1:{{ $w.OrdererPort . "Listen" }}
{{- end }}{{ end }}
BatchTimeout: 1s
BatchSize:
MaxMessageCount: 1
AbsoluteMaxBytes: 98 MB
PreferredMaxBytes: 512 KB
Capabilities:
V1_1: true
{{- if eq $w.Consensus.Type "kafka" }}
Kafka:
Brokers:{{ range $w.BrokerAddresses "HostPort" }}
- {{ . }}
{{- end }}
{{- end }}
Organizations:{{ range $w.OrgsForOrderers .Orderers }}
- *{{ .MSPID }}
{{- end }}
Policies:
Readers:
Type: ImplicitMeta
Rule: ANY Readers
Writers:
Type: ImplicitMeta
Rule: ANY Writers
Admins:
Type: ImplicitMeta
Rule: MAJORITY Admins
BlockValidation:
Type: ImplicitMeta
Rule: ANY Writers
{{- else }}
Application:
Capabilities:
V1_2: true
Organizations:{{ range .Organizations }}
- *{{ ($w.Organization .).MSPID }}
{{- end}}
Policies:
Readers:
Type: ImplicitMeta
Rule: ANY Readers
Writers:
Type: ImplicitMeta
Rule: ANY Writers
Admins:
Type: ImplicitMeta
Rule: MAJORITY Admins
Consortium: {{ .Consortium }}
{{- end }}
{{- end }}
{{ end }}
`
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。