Commit c4cb0e1
vividcoder
fix(config): write CLI storage params directly to Storage object
applyCLIParams() wrote 7 storage-related values to intermediate fields
on CommonParameter instead of the Storage object that is actually used
at runtime. Since applyConfigParams() runs first, these CLI values were
silently ignored.
- Remove 7 intermediate fields from CommonParameter
- Simplify applyConfigParams() to read directly from config
- Fix applyCLIParams() to write directly to PARAMETER.storage
- Add tests for CLI-overrides-config and config-defaults scenarios1 parent 8cdda54 commit c4cb0e1
3 files changed
Lines changed: 68 additions & 59 deletions
File tree
- common/src/main/java/org/tron/common/parameter
- framework/src
- main/java/org/tron/core/config/args
- test/java/org/tron/core/config/args
Lines changed: 0 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 79 | | |
101 | 80 | | |
102 | 81 | | |
| |||
Lines changed: 15 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
259 | 236 | | |
260 | 237 | | |
261 | 238 | | |
| |||
1057 | 1034 | | |
1058 | 1035 | | |
1059 | 1036 | | |
1060 | | - | |
| 1037 | + | |
1061 | 1038 | | |
1062 | 1039 | | |
1063 | | - | |
| 1040 | + | |
1064 | 1041 | | |
1065 | 1042 | | |
1066 | | - | |
| 1043 | + | |
1067 | 1044 | | |
1068 | 1045 | | |
1069 | | - | |
| 1046 | + | |
1070 | 1047 | | |
1071 | 1048 | | |
1072 | | - | |
| 1049 | + | |
1073 | 1050 | | |
1074 | 1051 | | |
1075 | | - | |
| 1052 | + | |
1076 | 1053 | | |
1077 | 1054 | | |
1078 | | - | |
| 1055 | + | |
1079 | 1056 | | |
1080 | 1057 | | |
1081 | 1058 | | |
| |||
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
285 | 338 | | |
286 | 339 | | |
0 commit comments