47
47
Name : "init" ,
48
48
Usage : "Bootstrap and initialize a new genesis block" ,
49
49
ArgsUsage : "<genesisPath>" ,
50
- Flags : []cli.Flag {
51
- utils .DataDirFlag ,
52
- },
53
- Category : "BLOCKCHAIN COMMANDS" ,
50
+ Flags : utils .DatabasePathFlags ,
51
+ Category : "BLOCKCHAIN COMMANDS" ,
54
52
Description : `
55
53
The init command initializes a new genesis block and definition for the network.
56
54
This is a destructive action and changes the network in which you will be
@@ -63,14 +61,8 @@ It expects the genesis file as argument.`,
63
61
Name : "dumpgenesis" ,
64
62
Usage : "Dumps genesis block JSON configuration to stdout" ,
65
63
ArgsUsage : "" ,
66
- Flags : []cli.Flag {
67
- utils .MainnetFlag ,
68
- utils .RopstenFlag ,
69
- utils .SepoliaFlag ,
70
- utils .RinkebyFlag ,
71
- utils .GoerliFlag ,
72
- },
73
- Category : "BLOCKCHAIN COMMANDS" ,
64
+ Flags : utils .NetworkFlags ,
65
+ Category : "BLOCKCHAIN COMMANDS" ,
74
66
Description : `
75
67
The dumpgenesis command dumps the genesis block configuration in JSON format to stdout.` ,
76
68
}
@@ -79,8 +71,7 @@ The dumpgenesis command dumps the genesis block configuration in JSON format to
79
71
Name : "import" ,
80
72
Usage : "Import a blockchain file" ,
81
73
ArgsUsage : "<filename> (<filename 2> ... <filename N>) " ,
82
- Flags : []cli.Flag {
83
- utils .DataDirFlag ,
74
+ Flags : append ([]cli.Flag {
84
75
utils .CacheFlag ,
85
76
utils .SyncModeFlag ,
86
77
utils .GCModeFlag ,
@@ -102,7 +93,7 @@ The dumpgenesis command dumps the genesis block configuration in JSON format to
102
93
utils .MetricsInfluxDBBucketFlag ,
103
94
utils .MetricsInfluxDBOrganizationFlag ,
104
95
utils .TxLookupLimitFlag ,
105
- },
96
+ }, utils . DatabasePathFlags ... ),
106
97
Category : "BLOCKCHAIN COMMANDS" ,
107
98
Description : `
108
99
The import command imports blocks from an RLP-encoded form. The form can be one file
@@ -116,11 +107,10 @@ processing will proceed even if an individual RLP-file import failure occurs.`,
116
107
Name : "export" ,
117
108
Usage : "Export blockchain into file" ,
118
109
ArgsUsage : "<filename> [<blockNumFirst> <blockNumLast>]" ,
119
- Flags : []cli.Flag {
120
- utils .DataDirFlag ,
110
+ Flags : append ([]cli.Flag {
121
111
utils .CacheFlag ,
122
112
utils .SyncModeFlag ,
123
- },
113
+ }, utils . DatabasePathFlags ... ),
124
114
Category : "BLOCKCHAIN COMMANDS" ,
125
115
Description : `
126
116
Requires a first argument of the file to write to.
@@ -134,11 +124,10 @@ be gzipped.`,
134
124
Name : "import-preimages" ,
135
125
Usage : "Import the preimage database from an RLP stream" ,
136
126
ArgsUsage : "<datafile>" ,
137
- Flags : []cli.Flag {
138
- utils .DataDirFlag ,
127
+ Flags : append ([]cli.Flag {
139
128
utils .CacheFlag ,
140
129
utils .SyncModeFlag ,
141
- },
130
+ }, utils . DatabasePathFlags ... ),
142
131
Category : "BLOCKCHAIN COMMANDS" ,
143
132
Description : `
144
133
The import-preimages command imports hash preimages from an RLP encoded stream.
@@ -150,11 +139,10 @@ It's deprecated, please use "geth db import" instead.
150
139
Name : "export-preimages" ,
151
140
Usage : "Export the preimage database into an RLP stream" ,
152
141
ArgsUsage : "<dumpfile>" ,
153
- Flags : []cli.Flag {
154
- utils .DataDirFlag ,
142
+ Flags : append ([]cli.Flag {
155
143
utils .CacheFlag ,
156
144
utils .SyncModeFlag ,
157
- },
145
+ }, utils . DatabasePathFlags ... ),
158
146
Category : "BLOCKCHAIN COMMANDS" ,
159
147
Description : `
160
148
The export-preimages command exports hash preimages to an RLP encoded stream.
@@ -166,16 +154,15 @@ It's deprecated, please use "geth db export" instead.
166
154
Name : "dump" ,
167
155
Usage : "Dump a specific block from storage" ,
168
156
ArgsUsage : "[? <blockHash> | <blockNum>]" ,
169
- Flags : []cli.Flag {
170
- utils .DataDirFlag ,
157
+ Flags : append ([]cli.Flag {
171
158
utils .CacheFlag ,
172
159
utils .IterativeOutputFlag ,
173
160
utils .ExcludeCodeFlag ,
174
161
utils .ExcludeStorageFlag ,
175
162
utils .IncludeIncompletesFlag ,
176
163
utils .StartKeyFlag ,
177
164
utils .DumpLimitFlag ,
178
- },
165
+ }, utils . DatabasePathFlags ... ),
179
166
Category : "BLOCKCHAIN COMMANDS" ,
180
167
Description : `
181
168
This command dumps out the state for a given block (or latest, if none provided).
0 commit comments