{{define "main" -}}
daemon=1
server=1
{{if .Backend.Mainnet}}mainnet=1{{else}}testnet=1{{end}}
nolisten=1
rpcuser={{.IPC.RPCUser}}
rpcpassword={{.IPC.RPCPass}}
{{if .Backend.Mainnet}}rpcport={{.Ports.BackendRPC}}{{end}}
txindex=1

zmqpubhashtx={{template "IPC.MessageQueueBindingTemplate" .}}
zmqpubhashblock={{template "IPC.MessageQueueBindingTemplate" .}}

rpcworkqueue=1100
maxmempool=2000
dbcache=1000

{{- if .Backend.AdditionalParams}}
# generated from additional_params
{{- range $name, $value := .Backend.AdditionalParams}}
{{- if eq $name "addnode"}}
{{- range $index, $node := $value}}
addnode={{$node}}
{{- end}}
{{- else}}
{{$name}}={{$value}}
{{- end}}
{{- end}}
{{- end}}

{{if not .Backend.Mainnet}}
[test]
rpcport={{.Ports.BackendRPC}}
{{end}}

{{end}}
