|
80 | 80 | })) cfg.extraNodeConfig; |
81 | 81 | baseInstanceConfig = |
82 | 82 | i: |
83 | | - if !cfg.useLegacyTracing |
84 | | - then baseConfig // |
85 | | - { ## XXX: remove once legacy tracing is dropped |
86 | | - minSeverity = "Critical"; |
87 | | - setupScribes = []; |
88 | | - setupBackends = []; |
89 | | - defaultScribes = []; |
90 | | - defaultBackends = []; |
91 | | - options = {}; |
92 | | - } |
93 | | - else baseConfig // |
94 | | - { |
95 | | - UseTraceDispatcher = false; |
96 | | - } // |
97 | | - (optionalAttrs (baseConfig ? hasEKG) { |
98 | | - hasEKG = baseConfig.hasEKG + i; |
99 | | - }) // |
100 | | - (optionalAttrs (baseConfig ? hasPrometheus) { |
101 | | - hasPrometheus = map (n: if isInt n then n + i else n) baseConfig.hasPrometheus; |
102 | | - }); |
| 83 | + ( if !cfg.useLegacyTracing |
| 84 | + then baseConfig // |
| 85 | + { ## XXX: remove once legacy tracing is dropped |
| 86 | + minSeverity = "Critical"; |
| 87 | + setupScribes = []; |
| 88 | + setupBackends = []; |
| 89 | + defaultScribes = []; |
| 90 | + defaultBackends = []; |
| 91 | + options = {}; |
| 92 | + } |
| 93 | + else baseConfig // |
| 94 | + { |
| 95 | + UseTraceDispatcher = false; |
| 96 | + } // |
| 97 | + (optionalAttrs (baseConfig ? hasEKG) { |
| 98 | + hasEKG = baseConfig.hasEKG + i; |
| 99 | + }) // |
| 100 | + (optionalAttrs (baseConfig ? hasPrometheus) { |
| 101 | + hasPrometheus = map (n: if isInt n then n + i else n) baseConfig.hasPrometheus; |
| 102 | + }) |
| 103 | + ) |
| 104 | + // optionalAttrs (cfg.withUtxoHdLmdb i){ |
| 105 | + LedgerDB = { |
| 106 | + Backend = "V1LMDB"; |
| 107 | + LiveTablesPath = cfg.lmdbDatabasePath i; |
| 108 | + }; |
| 109 | + }; |
103 | 110 | in i: let |
104 | 111 | instanceConfig = recursiveUpdate (baseInstanceConfig i) (cfg.extraNodeInstanceConfig i); |
105 | 112 | nodeConfigFile = if (cfg.nodeConfigFile != null) then cfg.nodeConfigFile |
|
133 | 140 | ]; |
134 | 141 | }; |
135 | 142 | instanceDbPath = cfg.databasePath i; |
136 | | - utxoLmdbParams = ["--utxos-on-disk"] |
137 | | - ++ lib.optionals (cfg.lmdbDatabasePath i != null) |
138 | | - [ "--utxos-database-path ${cfg.lmdbDatabasePath i}" |
139 | | - ]; |
140 | 143 | cmd = builtins.filter (x: x != "") [ |
141 | 144 | "${cfg.executable} run" |
142 | 145 | "--config ${nodeConfigFile}" |
|
152 | 155 | "--tracer-socket-path-accept ${cfg.tracerSocketPathAccept i}" |
153 | 156 | ] ++ lib.optionals (cfg.tracerSocketPathConnect i != null) [ |
154 | 157 | "--tracer-socket-path-connect ${cfg.tracerSocketPathConnect i}" |
155 | | - ] ++ lib.optionals (cfg.withUtxoHdLmdb i) utxoLmdbParams |
156 | | - ++ consensusParams.${cfg.nodeConfig.Protocol} ++ cfg.extraArgs ++ cfg.rtsArgs; |
| 158 | + ] ++ consensusParams.${cfg.nodeConfig.Protocol} ++ cfg.extraArgs ++ cfg.rtsArgs; |
157 | 159 | in '' |
158 | 160 | echo "Starting: ${concatStringsSep "\"\n echo \"" cmd}" |
159 | 161 | echo "..or, once again, in a single line:" |
|
0 commit comments