Commit b129246
vividcoder
refactor(config): restructure Args init flow and WitnessInitializer
- Restructure Args.setParam into 4-step flow: parse CLI, apply config,
apply CLI overrides, init witnesses
- Rename setParam(Config) to applyConfigParams, setCLIParameter to
applyCLIParams for clarity
- Extract WitnessInitializer into 3 static methods (initFromCLIPrivateKey,
initFromCFGPrivateKey, initFromKeystore) with routing in Args
- Remove password/privateKey/witnessAddress/help/version/configFilePath
from CommonParameter — pass as method params instead of global state
- Move JDK version check from Args to FullNode entry point
- Extract Configuration.getByFileName for single-param config loading1 parent b6939fd commit b129246
File tree
14 files changed
+456
-521
lines changed- common/src/main/java/org/tron
- common/parameter
- core/config
- framework/src
- main/java/org/tron
- core/config/args
- program
- test/java/org/tron
- common
- core
- config
- args
- exception
- net
14 files changed
+456
-521
lines changedLines changed: 7 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 39 | + | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
| |||
81 | 75 | | |
82 | 76 | | |
83 | 77 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 78 | | |
88 | 79 | | |
89 | 80 | | |
| |||
93 | 84 | | |
94 | 85 | | |
95 | 86 | | |
96 | | - | |
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
| |||
362 | 352 | | |
363 | 353 | | |
364 | 354 | | |
365 | | - | |
| 355 | + | |
| 356 | + | |
366 | 357 | | |
367 | 358 | | |
368 | 359 | | |
| |||
Lines changed: 6 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 40 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 41 | + | |
| 42 | + | |
53 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
54 | 47 | | |
55 | 48 | | |
56 | 49 | | |
| |||
0 commit comments